gccrs icon indicating copy to clipboard operation
gccrs copied to clipboard

non-exhaustive pattern matching should give an error

Open lucasly-ba opened this issue 1 month ago • 1 comments

code:


pub fn main() {
    let x = 3;

    match x {
        4 => 0,   
        3 => 0, 
    };
}

lucasly-ba avatar Nov 19 '25 13:11 lucasly-ba

I think we have some exhaustiveness checks, but they fail open with literal patterns.

powerboat9 avatar Nov 19 '25 23:11 powerboat9