summaryrefslogtreecommitdiffstats
path: root/src/test/ui/nll/issue-55344.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/test/ui/nll/issue-55344.rs14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/test/ui/nll/issue-55344.rs b/src/test/ui/nll/issue-55344.rs
new file mode 100644
index 000000000..20f18dc46
--- /dev/null
+++ b/src/test/ui/nll/issue-55344.rs
@@ -0,0 +1,14 @@
+// check-pass
+
+#![deny(unused_mut)]
+
+pub fn foo() {
+ return;
+
+ let mut v = 0;
+ assert_eq!(v, 0);
+ v = 1;
+ assert_eq!(v, 1);
+}
+
+fn main() {}