@@ -6,6 +6,8 @@ LL | 'l0 while false {}
6
6
| | |
7
7
| | help: add `:` after the label
8
8
| the label
9
+ |
10
+ = note: labels are used before loops and blocks, allowing e.g., `break 'label` to them
9
11
10
12
error: labeled expression must be followed by `:`
11
13
--> $DIR/labeled-no-colon-expr.rs:5:5
@@ -15,6 +17,8 @@ LL | 'l1 for _ in 0..1 {}
15
17
| | |
16
18
| | help: add `:` after the label
17
19
| the label
20
+ |
21
+ = note: labels are used before loops and blocks, allowing e.g., `break 'label` to them
18
22
19
23
error: labeled expression must be followed by `:`
20
24
--> $DIR/labeled-no-colon-expr.rs:6:5
@@ -24,6 +28,8 @@ LL | 'l2 loop {}
24
28
| | |
25
29
| | help: add `:` after the label
26
30
| the label
31
+ |
32
+ = note: labels are used before loops and blocks, allowing e.g., `break 'label` to them
27
33
28
34
error: labeled expression must be followed by `:`
29
35
--> $DIR/labeled-no-colon-expr.rs:7:5
@@ -33,6 +39,8 @@ LL | 'l3 {}
33
39
| | |
34
40
| | help: add `:` after the label
35
41
| the label
42
+ |
43
+ = note: labels are used before loops and blocks, allowing e.g., `break 'label` to them
36
44
37
45
error: expected `while`, `for`, `loop` or `{` after a label
38
46
--> $DIR/labeled-no-colon-expr.rs:8:9
@@ -48,6 +56,8 @@ LL | 'l4 0;
48
56
| | |
49
57
| | help: add `:` after the label
50
58
| the label
59
+ |
60
+ = note: labels are used before loops and blocks, allowing e.g., `break 'label` to them
51
61
52
62
error: cannot use a `block` macro fragment here
53
63
--> $DIR/labeled-no-colon-expr.rs:13:17
@@ -72,6 +82,8 @@ LL | 'l5 $b;
72
82
...
73
83
LL | m!({});
74
84
| ^^
85
+ |
86
+ = note: labels are used before loops and blocks, allowing e.g., `break 'label` to them
75
87
76
88
error: aborting due to 8 previous errors
77
89
0 commit comments