]> git.lizzy.rs Git - rust.git/blob - src/test/ui/associated-types/hr-associated-type-bound-object.rs
feat(rustdoc): open sidebar menu when links inside it are focused
[rust.git] / src / test / ui / associated-types / hr-associated-type-bound-object.rs
1 trait X<'a>
2 where
3     for<'b> <Self as X<'b>>::U: Clone,
4 {
5     type U: ?Sized;
6 }
7 fn f<'a, T: X<'a> + ?Sized>(x: &<T as X<'a>>::U) {
8     //~^ ERROR the trait bound `for<'b> <T as X<'b>>::U: Clone` is not satisfied
9     <<T as X<'_>>::U>::clone(x);
10 }
11
12 pub fn main() {
13     f::<dyn X<'_, U = str>>("abc");
14 }