Skip to content

-Zvalidate-mir should check that SwitchInt values are valid for their type #75440

Closed
@oli-obk

Description

@oli-obk

Hypothetically we could have a

SwitchInt {
    switch_ty: u8,
    values: [1, 2, 500],
    ...
}

we expect this not to happen, so this is an invariant of MIR that we can check

cc @rust-lang/wg-mir-opt @RalfJung

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-mir-optArea: MIR optimizationsC-enhancementCategory: An issue proposing an enhancement or a PR with one.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