fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #66089 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum4560ea788cb

1.39.0
1.1 KiB34 linesraw
1error[E0268]: `break` outside of a loop
2  --> $DIR/array-break-length.rs:3:17
3   |
4LL |         |_: [_; break]| {}
5   |                 ^^^^^ cannot `break` outside of a loop
6
7error[E0268]: `continue` outside of a loop
8  --> $DIR/array-break-length.rs:8:17
9   |
10LL |         |_: [_; continue]| {}
11   |                 ^^^^^^^^ cannot `continue` outside of a loop
12
13error[E0308]: mismatched types
14  --> $DIR/array-break-length.rs:3:9
15   |
16LL |         |_: [_; break]| {}
17   |         ^^^^^^^^^^^^^^^^^^ expected (), found closure
18   |
19   = note: expected type `()`
20              found type `[closure@$DIR/array-break-length.rs:3:9: 3:27]`
21
22error[E0308]: mismatched types
23  --> $DIR/array-break-length.rs:8:9
24   |
25LL |         |_: [_; continue]| {}
26   |         ^^^^^^^^^^^^^^^^^^^^^ expected (), found closure
27   |
28   = note: expected type `()`
29              found type `[closure@$DIR/array-break-length.rs:8:9: 8:30]`
30
31error: aborting due to 4 previous errors
32
33Some errors have detailed explanations: E0268, E0308.
34For more information about an error, try `rustc --explain E0268`.