about summary refs log tree commit diff
path: root/tests/ui/unsafe/break-inside-unsafe-block-issue-128604.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/unsafe/break-inside-unsafe-block-issue-128604.rs')
-rw-r--r--tests/ui/unsafe/break-inside-unsafe-block-issue-128604.rs16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/ui/unsafe/break-inside-unsafe-block-issue-128604.rs b/tests/ui/unsafe/break-inside-unsafe-block-issue-128604.rs
index cbe7a03d389..a83141f0e4e 100644
--- a/tests/ui/unsafe/break-inside-unsafe-block-issue-128604.rs
+++ b/tests/ui/unsafe/break-inside-unsafe-block-issue-128604.rs
@@ -15,4 +15,20 @@ fn main() {
         //~^ ERROR `break` outside of a loop or labeled block
     }
 
+    {
+        //~^ HELP consider labeling this block to be able to break within it
+        unsafe {
+            break;
+            //~^ ERROR `break` outside of a loop or labeled block
+        }
+    }
+
+    while 2 > 1 {
+        unsafe {
+            if true || false {
+                break;
+            }
+        }
+    }
+
 }