diff options
Diffstat (limited to '')
-rw-r--r-- | src/test/ui/issues/issue-22599.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/test/ui/issues/issue-22599.rs b/src/test/ui/issues/issue-22599.rs new file mode 100644 index 000000000..05096e5c1 --- /dev/null +++ b/src/test/ui/issues/issue-22599.rs @@ -0,0 +1,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); +} |