]> git.proxmox.com Git - rustc.git/blob - src/test/ui/associated-types/hr-associated-type-bound-1.rs
New upstream version 1.46.0~beta.2+dfsg1
[rustc.git] / src / test / ui / associated-types / hr-associated-type-bound-1.rs
1 trait X<'a>
2 where
3 for<'b> <Self as X<'b>>::U: Clone,
4 {
5 type U: ?Sized;
6 fn f(&self, x: &Self::U) {
7 <Self::U>::clone(x);
8 }
9 }
10
11 impl X<'_> for i32 {
12 type U = str;
13 //~^ ERROR the trait bound `for<'b> <i32 as X<'b>>::U: std::clone::Clone`
14 }
15
16 fn main() {
17 1i32.f("abc");
18 }