]> git.proxmox.com Git - rustc.git/blame - src/test/ui/rfc-2093-infer-outlives/issue-54467.rs
New upstream version 1.41.1+dfsg1
[rustc.git] / src / test / ui / rfc-2093-infer-outlives / issue-54467.rs
CommitLineData
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
11trait MyIterator<'a>: Iterator where Self::Item: 'a { }
12
13struct MyStruct<'a, A> {
14 item: Box<dyn MyIterator<'a, Item = A>>
15}
16
17fn main() { }