]> git.lizzy.rs Git - rust.git/blob - tests/ui/type-alias-impl-trait/issue-69136-inner-lifetime-resolve-error.rs
Rollup merge of #104505 - WaffleLapkin:no-double-spaces-in-comments, r=jackh726
[rust.git] / tests / ui / type-alias-impl-trait / issue-69136-inner-lifetime-resolve-error.rs
1 // Regression test for #69136
2
3 #![feature(type_alias_impl_trait)]
4
5 trait SomeTrait {}
6
7 impl SomeTrait for () {}
8
9 trait WithAssoc<A> {
10     type AssocType;
11 }
12
13 impl<T> WithAssoc<T> for () {
14     type AssocType = ();
15 }
16
17 type Return<A> = impl WithAssoc<A, AssocType = impl SomeTrait + 'a>;
18 //~^ ERROR use of undeclared lifetime name `'a`
19
20 fn my_fun() -> Return<()> {}
21 //~^ ERROR expected generic type parameter, found `()`
22
23 fn main() {}