]>
Commit | Line | Data |
---|---|---|
13cf67c4 XL |
1 | // Regression test for #54467: |
2 | // | |
3 | // Here, the trait object has an "inferred outlives" requirement that | |
4 | // `<Self as MyIterator<'a>>::Item: 'a`; but since we don't know what | |
5 | // `Self` is, we were (incorrectly) messing things up, leading to | |
6 | // strange errors. This test ensures that we do not give compilation | |
7 | // errors. | |
8 | // | |
60c5eb7d | 9 | // check-pass |
13cf67c4 XL |
10 | |
11 | trait MyIterator<'a>: Iterator where Self::Item: 'a { } | |
12 | ||
13 | struct MyStruct<'a, A> { | |
14 | item: Box<dyn MyIterator<'a, Item = A>> | |
15 | } | |
16 | ||
17 | fn main() { } |