]> git.proxmox.com Git - rustc.git/blame - src/test/ui/traits/check-trait-object-bounds-5.rs
New upstream version 1.51.0+dfsg1
[rustc.git] / src / test / ui / traits / check-trait-object-bounds-5.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 Super {
13 type V;
14}
15
16trait Obj: Super {
17 type U: Is<T = Self::V>;
18}
19
20fn is_obj<T: ?Sized + Obj>(_: &T) {}
21
22fn f(x: &dyn Obj<U = i32, V = i64>) {
23 is_obj(x)
24 //~^ type mismatch resolving `<i32 as Is>::T == i64`
25}
26
27fn main() {}