]> git.lizzy.rs Git - rust.git/blob - src/test/ui/associated-types/hr-associated-type-bound-param-2.rs
feat(rustdoc): open sidebar menu when links inside it are focused
[rust.git] / src / test / ui / associated-types / hr-associated-type-bound-param-2.rs
1 // ignore-compare-mode-chalk
2 trait Z<'a, T: ?Sized>
3 where
4     T: Z<'a, u16>,
5     //~^ the trait bound `for<'b> <u16 as Z<'b, u16>>::W: Clone` is not satisfied
6     //~| the trait bound `for<'b> <u16 as Z<'b, u16>>::W: Clone` is not satisfied
7     for<'b> <T as Z<'b, u16>>::W: Clone,
8 {
9     type W: ?Sized;
10     fn h(&self, x: &T::W) {
11         <T::W>::clone(x);
12     }
13 }
14
15 impl<'a> Z<'a, u16> for u16 {
16     type W = str;
17     //~^ ERROR the trait bound `for<'b> <u16 as Z<'b, u16>>::W: Clone
18 }
19
20 fn main() {
21     1u16.h("abc");
22 }