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