]>
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 | ||
6a06907d XL |
5 | // revisions: min_tait full_tait |
6 | #![feature(min_type_alias_impl_trait)] | |
7 | #![cfg_attr(full_tait, feature(type_alias_impl_trait))] | |
8 | //[full_tait]~^ WARN incomplete | |
60c5eb7d | 9 | |
74b04a01 | 10 | trait UnwrapItemsExt<'a> { |
60c5eb7d XL |
11 | type Iter; |
12 | fn unwrap_items(self) -> Self::Iter; | |
13 | } | |
14 | ||
15 | struct MyStruct {} | |
16 | ||
17 | trait MyTrait<'a> {} | |
18 | ||
19 | impl<'a> MyTrait<'a> for MyStruct {} | |
20 | ||
74b04a01 | 21 | impl<'a, I> UnwrapItemsExt<'a> for I { |
60c5eb7d XL |
22 | type Iter = impl MyTrait<'a>; |
23 | ||
24 | fn unwrap_items(self) -> Self::Iter { | |
25 | MyStruct {} | |
26 | } | |
27 | } | |
28 | ||
29 | fn main() {} |