blob: 82e2743256b0511ee4bee7948584aa2d068132d0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
error: parentheses are required around this expression to avoid confusion with a labeled break expression
--> $DIR/lifetime_starts_expressions.rs:8:18
|
LL | loop { break 'label: loop { break 'label 42; }; }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
help: wrap the expression in parentheses
|
LL | loop { break ('label: loop { break 'label 42; }); }
| + +
error: parentheses are required around this expression to avoid confusion with a labeled break expression
--> $DIR/lifetime_starts_expressions.rs:33:15
|
LL | break 'inner_loop: loop {
| _______________^
LL | |
LL | |
LL | | break 'inner_loop 1;
LL | | };
| |_________^
|
help: wrap the expression in parentheses
|
LL ~ break ('inner_loop: loop {
LL |
LL |
LL | break 'inner_loop 1;
LL ~ });
|
warning: this labeled break expression is easy to confuse with an unlabeled break with a labeled value expression
--> $DIR/lifetime_starts_expressions.rs:15:9
|
LL | / break 'label
LL | |
LL | | loop { break 42; };
| |______________________________^
|
= note: `#[warn(break_with_label_and_loop)]` on by default
help: wrap this expression in parentheses
|
LL | (loop { break 42; });
| + +
error: aborting due to 2 previous errors; 1 warning emitted
|