]> git.lizzy.rs Git - rust.git/blob - tests/ui/loops/loop-break-value-no-repeat.stderr
Rollup merge of #106570 - Xaeroxe:div-duration-tests, r=JohnTitor
[rust.git] / tests / ui / loops / loop-break-value-no-repeat.stderr
1 error[E0571]: `break` with value from a `for` loop
2   --> $DIR/loop-break-value-no-repeat.rs:12:9
3    |
4 LL |     for _ in &[1,2,3] {
5    |     ----------------- you can't `break` with a value in a `for` loop
6 LL |         break 22
7    |         ^^^^^^^^ can only break with a value inside `loop` or breakable block
8    |
9 help: use `break` on its own without a value inside this `for` loop
10    |
11 LL |         break
12    |         ~~~~~
13
14 error: aborting due to previous error
15
16 For more information about this error, try `rustc --explain E0571`.