]> git.lizzy.rs Git - rust.git/blob - tests/ui/associated-types/hr-associated-type-bound-param-2.rs
Rollup merge of #107519 - joboet:raw_os_error_ty, r=Amanieu
[rust.git] / tests / ui / associated-types / hr-associated-type-bound-param-2.rs
1 trait Z<'a, T: ?Sized>
2 where
3     T: Z<'a, u16>,
4     //~^ the trait bound `str: Clone` is not satisfied
5     //~| the trait bound `str: Clone` is not satisfied
6     for<'b> <T as Z<'b, u16>>::W: Clone,
7 {
8     type W: ?Sized;
9     fn h(&self, x: &T::W) {
10         <T::W>::clone(x);
11     }
12 }
13
14 impl<'a> Z<'a, u16> for u16 {
15     type W = str;
16     //~^ ERROR the trait bound `str: Clone
17 }
18
19 fn main() {
20     1u16.h("abc");
21 }