about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'src/test')
-rw-r--r--src/test/run-pass/issue-25343.rs15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/test/run-pass/issue-25343.rs b/src/test/run-pass/issue-25343.rs
index 9e01d577276..64e7350fb82 100644
--- a/src/test/run-pass/issue-25343.rs
+++ b/src/test/run-pass/issue-25343.rs
@@ -8,9 +8,24 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#[allow(unused)]
 fn main() {
     || {
         'label: loop {
         }
     };
+
+    // More cases added from issue 31754
+
+    'label2: loop {
+        break;
+    }
+
+    let closure = || {
+        'label2: loop {}
+    };
+
+    fn inner_fn() {
+        'label2: loop {}
+    }
 }