]> git.proxmox.com Git - rustc.git/blob - src/test/ui/traits/associated_type_bound/check-trait-object-bounds-6.rs
Merge branch 'debian/experimental2' into debian/experimental
[rustc.git] / src / test / ui / traits / associated_type_bound / check-trait-object-bounds-6.rs
1 // Check that we validate associated type bounds on super traits for trait
2 // objects
3
4 trait Is {
5 type T;
6 }
7
8 impl<U> Is for U {
9 type T = U;
10 }
11
12 trait Obj {
13 type U: Is<T = Self::V>;
14 type V;
15 }
16
17 fn is_obj<T: ?Sized + Obj>(_: &T) {}
18
19 fn f(x: &dyn Obj<U = i32, V = i64>) {
20 is_obj(x)
21 //~^ ERROR type mismatch resolving `<i32 as Is>::T == i64`
22 }
23
24 fn main() {}