]> git.lizzy.rs Git - rust.git/blob - tests/ui/associated-types/hr-associated-type-bound-1.rs
Rollup merge of #106661 - mjguzik:linux_statx, r=Mark-Simulacrum
[rust.git] / tests / 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 `str: Clone`
14 }
15
16 fn main() {
17     1i32.f("abc");
18 }