//! Regression test for #69136 //! This test checks that the unknown lifetime `'a` doesn't cause //! ICEs after emitting the error. #![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 {} fn main() {}