mirror of
https://github.com/rust-lang/rust
synced 2024-11-05 20:45:15 +00:00
10 lines
158 B
Rust
10 lines
158 B
Rust
#![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);
|
|
}
|