// Regression test for #69136 #![feature(type_alias_impl_trait)] trait SomeTrait {} impl SomeTrait for () {} trait WithAssoc { type AssocType; } impl WithAssoc for () { type AssocType = (); } type Return = impl WithAssoc; //~^ ERROR use of undeclared lifetime name `'a` fn my_fun() -> Return<()> {} //~^ ERROR non-defining opaque type use in defining scope fn main() {}