]> git.proxmox.com Git - rustc.git/blame - src/test/ui/type-alias-impl-trait/assoc-type-lifetime.rs
New upstream version 1.52.0~beta.3+dfsg1
[rustc.git] / src / test / ui / type-alias-impl-trait / assoc-type-lifetime.rs
CommitLineData
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 10trait UnwrapItemsExt<'a> {
60c5eb7d
XL
11 type Iter;
12 fn unwrap_items(self) -> Self::Iter;
13}
14
15struct MyStruct {}
16
17trait MyTrait<'a> {}
18
19impl<'a> MyTrait<'a> for MyStruct {}
20
74b04a01 21impl<'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
29fn main() {}