]> git.lizzy.rs Git - rust.git/blob - src/test/ui/associated-types/hr-associated-type-bound-2.rs
feat(rustdoc): open sidebar menu when links inside it are focused
[rust.git] / src / test / ui / associated-types / hr-associated-type-bound-2.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 u32
12 where
13     for<'b> <Self as X<'b>>::U: Clone,
14 {
15     type U = str;
16 }
17
18 fn main() {
19     1u32.f("abc");
20     //~^ ERROR the method
21 }