-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Open
Labels
A-varianceArea: Variance (https://doc.rust-lang.org/nomicon/subtyping.html)Area: Variance (https://doc.rust-lang.org/nomicon/subtyping.html)C-bugCategory: This is a bug.Category: This is a bug.F-lazy_type_alias`#![feature(lazy_type_alias)]``#![feature(lazy_type_alias)]`T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.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
I tried this code:
#![feature(lazy_type_alias)]
type Foo<T> = u32;
This current fails but I believe it should compile. I Imagine the reason we currently forbid this on stable is that as we have no representation for free type aliases in Ty
any unused arguments to free type aliases would never be seen. With free type aliases having a proper representation as part of Ty
under this feature gate it ought to be possible to soundly support this?
Tested on: nightly rust 1.88.0 2025-04-07 e643f59
Metadata
Metadata
Assignees
Labels
A-varianceArea: Variance (https://doc.rust-lang.org/nomicon/subtyping.html)Area: Variance (https://doc.rust-lang.org/nomicon/subtyping.html)C-bugCategory: This is a bug.Category: This is a bug.F-lazy_type_alias`#![feature(lazy_type_alias)]``#![feature(lazy_type_alias)]`T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.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.
Type
Projects
Status
In Progress