Skip to content

[Use Case]: scope based normalization of const generics #51

Open
@BoxyUwU

Description

@BoxyUwU

Code description

fn concrete(input: [u32; 10]) {
    // ...
}

fn generic<const N: usize>(input: [u32; N]) {
    match N {
        10 => concrete(input),
        _ => panic!("invalid input size"),
    }
}

Some people have wanted this to compile, this has some overlap with pattern types I expect cc @oli-obk

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-generic-exprsGeneric const expressionsC-use-caseCategory: This is a use case for a feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions