@@ -6,6 +6,8 @@ LL | 'l0 while false {}
66 | | |
77 | | help: add `:` after the label
88 | the label
9+ |
10+ = note: labels are used before loops and blocks, allowing e.g., `break 'label` to them
911
1012error: labeled expression must be followed by `:`
1113 --> $DIR/labeled-no-colon-expr.rs:5:5
@@ -15,6 +17,8 @@ LL | 'l1 for _ in 0..1 {}
1517 | | |
1618 | | help: add `:` after the label
1719 | the label
20+ |
21+ = note: labels are used before loops and blocks, allowing e.g., `break 'label` to them
1822
1923error: labeled expression must be followed by `:`
2024 --> $DIR/labeled-no-colon-expr.rs:6:5
@@ -24,6 +28,8 @@ LL | 'l2 loop {}
2428 | | |
2529 | | help: add `:` after the label
2630 | the label
31+ |
32+ = note: labels are used before loops and blocks, allowing e.g., `break 'label` to them
2733
2834error: labeled expression must be followed by `:`
2935 --> $DIR/labeled-no-colon-expr.rs:7:5
@@ -33,6 +39,8 @@ LL | 'l3 {}
3339 | | |
3440 | | help: add `:` after the label
3541 | the label
42+ |
43+ = note: labels are used before loops and blocks, allowing e.g., `break 'label` to them
3644
3745error: expected `while`, `for`, `loop` or `{` after a label
3846 --> $DIR/labeled-no-colon-expr.rs:8:9
@@ -48,6 +56,8 @@ LL | 'l4 0;
4856 | | |
4957 | | help: add `:` after the label
5058 | the label
59+ |
60+ = note: labels are used before loops and blocks, allowing e.g., `break 'label` to them
5161
5262error: cannot use a `block` macro fragment here
5363 --> $DIR/labeled-no-colon-expr.rs:13:17
@@ -72,6 +82,8 @@ LL | 'l5 $b;
7282...
7383LL | m!({});
7484 | ^^
85+ |
86+ = note: labels are used before loops and blocks, allowing e.g., `break 'label` to them
7587
7688error: aborting due to 8 previous errors
7789
0 commit comments