1 error[E0261]: use of undeclared lifetime name `'a`
2 --> $DIR/issue-69136-inner-lifetime-resolve-error.rs:17:65
4 LL | type Return<A> = impl WithAssoc<A, AssocType = impl SomeTrait + 'a>;
5 | ^^ undeclared lifetime
7 = note: for more information on higher-ranked polymorphism, visit https://doc.rust-lang.org/nomicon/hrtb.html
8 help: consider making the bound lifetime-generic with a new `'a` lifetime
10 LL | type Return<A> = impl for<'a> WithAssoc<A, AssocType = impl SomeTrait + 'a>;
12 help: consider introducing lifetime `'a` here
14 LL | type Return<'a, A> = impl WithAssoc<A, AssocType = impl SomeTrait + 'a>;
17 error: non-defining opaque type use in defining scope
18 --> $DIR/issue-69136-inner-lifetime-resolve-error.rs:20:27
20 LL | fn my_fun() -> Return<()> {}
23 note: used non-generic type `()` for generic parameter
24 --> $DIR/issue-69136-inner-lifetime-resolve-error.rs:17:13
26 LL | type Return<A> = impl WithAssoc<A, AssocType = impl SomeTrait + 'a>;
29 error: non-defining opaque type use in defining scope
30 --> $DIR/issue-69136-inner-lifetime-resolve-error.rs:20:27
32 LL | fn my_fun() -> Return<()> {}
35 note: used non-generic type `()` for generic parameter
36 --> $DIR/issue-69136-inner-lifetime-resolve-error.rs:17:13
38 LL | type Return<A> = impl WithAssoc<A, AssocType = impl SomeTrait + 'a>;
41 error: aborting due to 3 previous errors
43 For more information about this error, try `rustc --explain E0261`.