]> git.lizzy.rs Git - rust.git/blobdiff - src/test/ui/closure-array-break-length.rs
Add a test for break
[rust.git] / src / test / ui / closure-array-break-length.rs
index 4b0e941a3ce2aacef71cffd6b4fb5af2a41e322c..2e99921956ab295b1f89dc4bdfe798b7d0bb39aa 100644 (file)
@@ -12,4 +12,6 @@ fn main() {
     |_: [_; continue]| {}; //~ ERROR: `continue` outside of loop
 
     while |_: [_; continue]| {} {} //~ ERROR: `break` or `continue` with no label
+
+    while |_: [_; break]| {} {} //~ ERROR: `break` or `continue` with no label
 }