]>
Commit | Line | Data |
---|---|---|
b7449926 XL |
1 | // Regression test for an NLL-related ICE (#52992) -- computing |
2 | // implied bounds was causing outlives relations that were not | |
3 | // properly handled. | |
2c00a5a8 | 4 | // |
60c5eb7d | 5 | // check-pass |
b7449926 | 6 | |
b7449926 XL |
7 | fn main() {} |
8 | ||
9 | fn fail<'a>() -> Struct<'a, Generic<()>> { | |
10 | Struct(&Generic(())) | |
2c00a5a8 | 11 | } |
3157f602 | 12 | |
b7449926 XL |
13 | struct Struct<'a, T>(&'a T) where |
14 | T: Trait + 'a, | |
15 | T::AT: 'a; // only fails with this bound | |
16 | ||
17 | struct Generic<T>(T); | |
18 | ||
19 | trait Trait { | |
20 | type AT; | |
a7813a04 XL |
21 | } |
22 | ||
b7449926 XL |
23 | impl<T> Trait for Generic<T> { |
24 | type AT = T; // only fails with a generic AT | |
25 | } |