]>
Commit | Line | Data |
---|---|---|
60c5eb7d XL |
1 | // Tests that we still detect defining usages when |
2 | // lifetimes are used in an associated opaque type | |
3 | // check-pass | |
4 | ||
353b0b11 | 5 | #![feature(impl_trait_in_assoc_type)] |
60c5eb7d | 6 | |
74b04a01 | 7 | trait UnwrapItemsExt<'a> { |
60c5eb7d XL |
8 | type Iter; |
9 | fn unwrap_items(self) -> Self::Iter; | |
10 | } | |
11 | ||
12 | struct MyStruct {} | |
13 | ||
14 | trait MyTrait<'a> {} | |
15 | ||
16 | impl<'a> MyTrait<'a> for MyStruct {} | |
17 | ||
74b04a01 | 18 | impl<'a, I> UnwrapItemsExt<'a> for I { |
60c5eb7d XL |
19 | type Iter = impl MyTrait<'a>; |
20 | ||
21 | fn unwrap_items(self) -> Self::Iter { | |
22 | MyStruct {} | |
23 | } | |
24 | } | |
25 | ||
26 | fn main() {} |