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