]> git.proxmox.com Git - rustc.git/blob - src/test/ui/traits/check-trait-object-bounds-4.rs
New upstream version 1.49.0~beta.4+dfsg1
[rustc.git] / src / test / ui / traits / check-trait-object-bounds-4.rs
1 // Check that we validate associated type bounds on super traits for trait
2 // objects
3
4 trait Super {
5 type Y: Clone;
6 }
7
8 trait X: Super {}
9
10 fn f<T: X + ?Sized>() {
11 None::<T::Y>.clone();
12 }
13
14 fn main() {
15 f::<dyn X<Y = str>>();
16 //~^ ERROR the trait bound `str: Clone` is not satisfied
17 }