Skip to content

False negative pattern irrefutable for literal #22754

Description

@A4-Tacks

rust-analyzer version: rust-analyzer 0.4.2957-standalone

rustc version: rustc 1.97.0-nightly (36ba2c771 2026-04-23)

editor or extension: Vim

code snippet to reproduce:

fn main() {
    match 0 {
        0 => (),
    }
    match Some(0) {
        Some(0) => (),
    }
}

Expect: missing match arm ...

Actual: no any diagnostics

Metadata

Metadata

Labels

A-patternpattern handling related thingsC-featureCategory: feature request

Type

No type

Fields

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