Add N missing match arms uses colliding bindings for struct enum variants

Author: kitt159Created Sep 25, 2026Updated Sep 25, 2026
Labelsgood first issueC-bugS-blocked

rust-analyzer version: 0.3.3049-standalone rustc version: 1.98.1 (48a229cea 2026-09-01) editor or extension: vscode 1.138.0 code snippet to reproduce:

rust
enum Expr {
    Zero,
    Node { u: f64, l: f64, d: u32 },
}

fn main(a: Expr, b: Expr) {
    match (a, b) {}
}

rust-analyzer recommends this quick fix:

rust
    match (a, b) {
        (Expr::Zero, Expr::Zero) => todo!(),
        (Expr::Zero, Expr::Node { u, l, d }) => todo!(),
        (Expr::Node { u, l, d }, Expr::Zero) => todo!(),
        (Expr::Node { u, l, d }, Expr::Node { u, l, d }) => todo!(),
    }

Last arm contains colliding names u, l, d, so it wont compile.