mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 01:04:03 +00:00
75 lines
2.5 KiB
Plaintext
75 lines
2.5 KiB
Plaintext
error: expected `while`, `for`, `loop` or `{` after a label
|
|
--> $DIR/recover-labeled-non-block-expr.rs:3:21
|
|
|
|
|
LL | let _ = 'label: 1 + 1;
|
|
| ^ expected `while`, `for`, `loop` or `{` after a label
|
|
|
|
|
help: consider removing the label
|
|
|
|
|
LL - let _ = 'label: 1 + 1;
|
|
LL + let _ = 1 + 1;
|
|
|
|
|
|
|
error: expected `while`, `for`, `loop` or `{` after a label
|
|
--> $DIR/recover-labeled-non-block-expr.rs:5:13
|
|
|
|
|
LL | 'label: match () { () => {}, };
|
|
| ^^^^^ expected `while`, `for`, `loop` or `{` after a label
|
|
|
|
|
help: consider removing the label
|
|
|
|
|
LL - 'label: match () { () => {}, };
|
|
LL + match () { () => {}, };
|
|
|
|
|
|
|
error: expected `while`, `for`, `loop` or `{` after a label
|
|
--> $DIR/recover-labeled-non-block-expr.rs:6:13
|
|
|
|
|
LL | 'label: match () { () => break 'label, };
|
|
| ^^^^^ expected `while`, `for`, `loop` or `{` after a label
|
|
|
|
|
help: consider enclosing expression in a block
|
|
|
|
|
LL | 'label: { match () { () => break 'label, } };
|
|
| + +
|
|
|
|
error: expected `while`, `for`, `loop` or `{` after a label
|
|
--> $DIR/recover-labeled-non-block-expr.rs:8:13
|
|
|
|
|
LL | 'label: match () { () => 'lp: loop { break 'lp 0 }, };
|
|
| ^^^^^ expected `while`, `for`, `loop` or `{` after a label
|
|
|
|
|
help: consider enclosing expression in a block
|
|
|
|
|
LL | 'label: { match () { () => 'lp: loop { break 'lp 0 }, } };
|
|
| + +
|
|
|
|
error: expected `while`, `for`, `loop` or `{` after a label
|
|
--> $DIR/recover-labeled-non-block-expr.rs:11:22
|
|
|
|
|
LL | let _i = 'label: match x {
|
|
| ^^^^^ expected `while`, `for`, `loop` or `{` after a label
|
|
|
|
|
help: consider enclosing expression in a block
|
|
|
|
|
LL ~ let _i = 'label: { match x {
|
|
LL | 0 => 42,
|
|
...
|
|
LL | _ => 1,
|
|
LL ~ } };
|
|
|
|
|
|
|
error: expected `while`, `for`, `loop` or `{` after a label
|
|
--> $DIR/recover-labeled-non-block-expr.rs:25:24
|
|
|
|
|
LL | let _val = 'label: (1, if other == 3 { break 'label (2, 3) } else { other });
|
|
| ^ expected `while`, `for`, `loop` or `{` after a label
|
|
|
|
|
help: consider enclosing expression in a block
|
|
|
|
|
LL | let _val = 'label: { (1, if other == 3 { break 'label (2, 3) } else { other }) };
|
|
| + +
|
|
|
|
error: aborting due to 6 previous errors
|
|
|