summaryrefslogtreecommitdiffstats
path: root/tests/ui/parser/break-in-unlabeled-block.fixed
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/parser/break-in-unlabeled-block.fixed')
-rw-r--r--tests/ui/parser/break-in-unlabeled-block.fixed11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/ui/parser/break-in-unlabeled-block.fixed b/tests/ui/parser/break-in-unlabeled-block.fixed
new file mode 100644
index 000000000..088562325
--- /dev/null
+++ b/tests/ui/parser/break-in-unlabeled-block.fixed
@@ -0,0 +1,11 @@
+// run-rustfix
+fn main() {
+ 'block: {
+ break 'block (); //~ ERROR `break` outside of a loop or labeled block
+ }
+ {
+ 'block: {
+ break 'block (); //~ ERROR `break` outside of a loop or labeled block
+ }
+ }
+}