]>
git.proxmox.com Git - rustc.git/blob - src/test/ui/rfc-2093-infer-outlives/issue-54467.rs
1 // Regression test for #54467:
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
11 trait MyIterator
<'a
>: Iterator
where Self::Item
: 'a { }
13 struct MyStruct
<'a
, A
> {
14 item
: Box
<dyn MyIterator
<'a
, Item
= A
>>