]> git.lizzy.rs Git - rust.git/blob - src/test/ui/associated-types/hr-associated-type-bound-param-3.rs
Merge commit 'da5a6fb1b65ec6581a67e942a3850f6bc15a552c' into clippyup
[rust.git] / src / test / ui / associated-types / hr-associated-type-bound-param-3.rs
1 // ignore-tidy-linelength
2
3 trait X<'a, T>
4 where
5     for<'b> T: X<'b, T>,
6     for<'b> <T as X<'b, T>>::U: Clone,
7 {
8     type U: ?Sized;
9     fn f(x: &<T as X<'_, T>>::U) {
10         <<T as X<'_, T>>::U>::clone(x);
11     }
12 }
13
14 impl<S, T> X<'_, (T,)> for (S,) {
15     type U = str;
16     //~^ ERROR the trait bound `for<'b> <(T,) as X<'b, (T,)>>::U: std::clone::Clone` is not satisfied
17 }
18
19 pub fn main() {
20     <(i32,) as X<(i32,)>>::f("abc");
21 }