False negative: missing match arm when constant in trait

Author: A4-TacksCreated Sep 17, 2026Updated Sep 17, 2026
LabelsA-diagnosticsC-bug

rust-analyzer version: rust-analyzer 0.4.3037-standalone

rustc version: rustc 1.100.0-nightly (c54751567 2026-08-22)

editor or extension: Vim coc-rust-analyzer

code snippet to reproduce:

rust
trait Bool<const B: bool> {
    const B: bool = B;
}
impl<const B: bool, T: ?Sized> Bool<B> for T {}

fn main() {
    match true {
        <() as Bool<false>>::B => {},
    }
}

Expect: missing match arm: true not covered

Actual: no diagnostics