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