]> git.proxmox.com Git - rustc.git/blob - src/test/ui/associated-types/hr-associated-type-bound-param-2.rs
New upstream version 1.67.1+dfsg1
[rustc.git] / src / test / ui / associated-types / hr-associated-type-bound-param-2.rs
1 trait Z<'a, T: ?Sized>
2 where
3 T: Z<'a, u16>,
4 //~^ the trait bound `str: Clone` is not satisfied
5 //~| the trait bound `str: Clone` is not satisfied
6 for<'b> <T as Z<'b, u16>>::W: Clone,
7 {
8 type W: ?Sized;
9 fn h(&self, x: &T::W) {
10 <T::W>::clone(x);
11 }
12 }
13
14 impl<'a> Z<'a, u16> for u16 {
15 type W = str;
16 //~^ ERROR the trait bound `str: Clone
17 }
18
19 fn main() {
20 1u16.h("abc");
21 }