From 7feeaf0d2748f9ff81076a96c16ef360c9033071 Mon Sep 17 00:00:00 2001 From: Chris Gregory Date: Sat, 1 Jun 2019 19:14:09 -0500 Subject: [PATCH] Add test --- src/test/ui/nll/issue-61424.rs | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 src/test/ui/nll/issue-61424.rs diff --git a/src/test/ui/nll/issue-61424.rs b/src/test/ui/nll/issue-61424.rs new file mode 100644 index 0000000000000..fcb5ff675986e --- /dev/null +++ b/src/test/ui/nll/issue-61424.rs @@ -0,0 +1,7 @@ +#![deny(unused_mut)] + +fn main() { + let mut x; //~ ERROR: variable does not need to be mutable + x = 0; + dbg!(0); +}