summaryrefslogtreecommitdiffstats
path: root/tests/ui/issues/issue-22599.rs
blob: 05096e5c18531c33a37e2f2551abfc59b682eaff (plain)
1
2
3
4
5
6
7
8
9
10
#![deny(unused_variables)]

fn f(_: i32) {}

fn main() {
    let mut v = 0;
    f(v);
    v = match 0 { a => 0 }; //~ ERROR: unused variable: `a`
    f(v);
}