]> git.lizzy.rs Git - rust.git/blob - src/test/ui/type-alias-impl-trait/issue-69136-inner-lifetime-resolve-error.rs
Auto merge of #82980 - tmiasko:import-cold-multiplier, r=michaelwoerister
[rust.git] / src / test / ui / type-alias-impl-trait / issue-69136-inner-lifetime-resolve-error.rs
1 // Regression test for #69136
2
3 // revisions: min_tait full_tait
4 #![feature(min_type_alias_impl_trait)]
5 #![cfg_attr(full_tait, feature(type_alias_impl_trait))]
6 //[full_tait]~^ WARN incomplete
7
8 trait SomeTrait {}
9
10 impl SomeTrait for () {}
11
12 trait WithAssoc<A> {
13     type AssocType;
14 }
15
16 impl<T> WithAssoc<T> for () {
17     type AssocType = ();
18 }
19
20 type Return<A> = impl WithAssoc<A, AssocType = impl SomeTrait + 'a>;
21 //~^ ERROR use of undeclared lifetime name `'a`
22
23 fn my_fun() -> Return<()> {}
24
25 fn main() {}