Skip to content

Free type aliases should not require all generic parameters to be used #140230

Open
@BoxyUwU

Description

@BoxyUwU

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

No one assigned

    Labels

    A-varianceArea: Variance (https://doc.rust-lang.org/nomicon/subtyping.html)C-bugCategory: This is a bug.F-lazy_type_alias`#![feature(lazy_type_alias)]`T-compilerRelevant 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.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions