-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
C-bugCategory: This is a bug.Category: This is a bug.F-type_alias_impl_trait`#[feature(type_alias_impl_trait)]``#[feature(type_alias_impl_trait)]`T-typesRelevant to the types team, which will review and decide on the PR/issue.Relevant to the types team, which will review and decide on the PR/issue.
Description
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
Metadata
Metadata
Assignees
Labels
C-bugCategory: This is a bug.Category: This is a bug.F-type_alias_impl_trait`#[feature(type_alias_impl_trait)]``#[feature(type_alias_impl_trait)]`T-typesRelevant to the types team, which will review and decide on the PR/issue.Relevant to the types team, which will review and decide on the PR/issue.