The following should compile.
#![feature(type_alias_impl_trait)]
#![allow(unconditional_recursion)]
type Opaque<'a> = impl Sized + 'a;
fn test<'a>() -> Opaque<'a> {
let _: () = test::<'a>();
//~^ ERROR expected generic lifetime parameter, found `'_`
}
Regressed in #122103. With the new generics of Opaque, the defining use at the let statement is Opaque<'_, 'a> := (). Cc @compiler-errors
The following should compile.
Regressed in #122103. With the new generics of
Opaque, the defining use at theletstatement isOpaque<'_, 'a> := (). Cc @compiler-errors