Skip to content

mark default label in switch generated from match as unreachable #4923

@thestinger

Description

@thestinger

This would let LLVM know that Rust's match is exhaustive, and it wouldn't have to leave a fallback code path except when the match actually has a _ pattern (which should be used as the default path). I noticed this in the glue code so it might be a measurable win for code size.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions