Skip to content

Spurious unconstrained const parameter warning in impl #60712

Closed
@varkor

Description

@varkor
#![feature(const_generics)]

struct S<const X: u32>;

impl<const X: u32> S<{X}> {} //~ ERROR

produces:

error[E0207]: the const parameter `X` is not constrained by the impl trait, self type, or predicates

which is clearly incorrect.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-const-genericsArea: const generics (parameters and arguments)C-bugCategory: This is a bug.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