Skip to content

Unit-like structs in const generic arguments #67075

Open
@sanxiyn

Description

@sanxiyn
#![feature(const_generics)]

#[derive(PartialEq, Eq)]
struct Unit;
trait Const<const U: Unit> {}
impl Const<Unit> for () {} // wrong number of const arguments

Const<{Unit}> works. See also #66615.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-const-genericsArea: const generics (parameters and arguments)C-bugCategory: This is a bug.C-feature-requestCategory: A feature request, i.e: not implemented / a PR.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