diff options
Diffstat (limited to '')
-rw-r--r-- | src/test/ui/issues/issue-66702-break-outside-loop-val.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/test/ui/issues/issue-66702-break-outside-loop-val.rs b/src/test/ui/issues/issue-66702-break-outside-loop-val.rs new file mode 100644 index 000000000..05b86cbbf --- /dev/null +++ b/src/test/ui/issues/issue-66702-break-outside-loop-val.rs @@ -0,0 +1,9 @@ +// Breaks with values inside closures used to ICE (#66863) + +fn main() { + 'some_label: loop { + || break 'some_label (); + //~^ ERROR: use of unreachable label `'some_label` + //~| ERROR: `break` inside of a closure + } +} |