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