Skip to content

Const generics: Bounds like T: Foo<{ value }> don't work #71986

Closed
@jplatte

Description

@jplatte

This is probably due to lazy normalization not being here yet, but I don't find any issues for this specifically so maybe this is a good additional test case for #71973 or a later PR?

#![feature(const_generics)]

trait Foo<const B: bool> {}
fn bar<T: Foo<{ true }>>() {}

I wouldn't even expect this to work necessarily, since the equivalent thing with an associated constant instead of a const generic argument produces cannot constrain an associated constant to a value (although without an error code 🙁).

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-const-genericsArea: const generics (parameters and arguments)A-lazy-normalizationArea: Lazy normalization (tracking issue: #60471)C-bugCategory: This is a bug.F-const_generics`#![feature(const_generics)]`T-compilerRelevant to the compiler 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