diff options
Diffstat (limited to 'tests/ui/array-slice-vec/array-break-length.rs')
-rw-r--r-- | tests/ui/array-slice-vec/array-break-length.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/ui/array-slice-vec/array-break-length.rs b/tests/ui/array-slice-vec/array-break-length.rs new file mode 100644 index 000000000..60589f7c2 --- /dev/null +++ b/tests/ui/array-slice-vec/array-break-length.rs @@ -0,0 +1,9 @@ +fn main() { + loop { + |_: [_; break]| {} //~ ERROR: `break` outside of a loop + } + + loop { + |_: [_; continue]| {} //~ ERROR: `continue` outside of a loop + } +} |