]>
Commit | Line | Data |
---|---|---|
29967ef6 XL |
1 | // Check that we don't have a cycle when we try to normalize `Self::U` in the |
2 | // bound below. Make sure that having a lifetime on the trait object doesn't break things | |
3 | ||
4 | // check-pass | |
5 | ||
6 | trait Is { | |
7 | type T; | |
8 | } | |
9 | ||
10 | impl<U> Is for U { | |
11 | type T = U; | |
12 | } | |
13 | ||
14 | trait Obj<'a> { | |
15 | type U: Is<T = Self::V>; | |
16 | type V; | |
17 | } | |
18 | ||
19 | fn is_obj<'a, T: ?Sized + Obj<'a>>(_: &T) {} | |
20 | ||
21 | fn f<'a>(x: &dyn Obj<'a, U = i32, V = i32>) { | |
22 | is_obj(x) | |
23 | } | |
24 | ||
25 | fn main() {} |