]>
Commit | Line | Data |
---|---|---|
fc512014 | 1 | error[E0425]: cannot find value `while_loop` in this scope |
5869c6ff | 2 | --> $DIR/label_misspelled.rs:6:9 |
fc512014 | 3 | | |
5869c6ff XL |
4 | LL | 'while_loop: while true { |
5 | | ----------- a label with a similar name exists | |
6 | LL | | |
fc512014 | 7 | LL | while_loop; |
5869c6ff | 8 | | ^^^^^^^^^^ not found in this scope |
fc512014 XL |
9 | |
10 | error[E0425]: cannot find value `while_let` in this scope | |
11 | --> $DIR/label_misspelled.rs:11:9 | |
12 | | | |
5869c6ff XL |
13 | LL | 'while_let: while let Some(_) = Some(()) { |
14 | | ---------- a label with a similar name exists | |
15 | LL | | |
fc512014 | 16 | LL | while_let; |
5869c6ff | 17 | | ^^^^^^^^^ not found in this scope |
fc512014 XL |
18 | |
19 | error[E0425]: cannot find value `for_loop` in this scope | |
5869c6ff | 20 | --> $DIR/label_misspelled.rs:16:9 |
fc512014 | 21 | | |
5869c6ff XL |
22 | LL | 'for_loop: for _ in 0..3 { |
23 | | --------- a label with a similar name exists | |
24 | LL | | |
fc512014 | 25 | LL | for_loop; |
5869c6ff XL |
26 | | ^^^^^^^^ not found in this scope |
27 | ||
28 | error[E0425]: cannot find value `LOOP` in this scope | |
29 | --> $DIR/label_misspelled.rs:21:9 | |
30 | | | |
31 | LL | 'LOOP: loop { | |
32 | | ----- a label with a similar name exists | |
33 | LL | | |
34 | LL | LOOP; | |
35 | | ^^^^ not found in this scope | |
36 | ||
37 | error[E0425]: cannot find value `LOOP` in this scope | |
38 | --> $DIR/label_misspelled.rs:28:15 | |
39 | | | |
40 | LL | 'LOOP: loop { | |
41 | | ----- a label with a similar name exists | |
42 | LL | break LOOP; | |
43 | | ^^^^ | |
44 | | | | |
45 | | not found in this scope | |
46 | | help: use the similarly named label: `'LOOP` | |
47 | ||
48 | error[E0425]: cannot find value `while_loop` in this scope | |
49 | --> $DIR/label_misspelled.rs:32:15 | |
50 | | | |
51 | LL | 'while_loop: while true { | |
52 | | ----------- a label with a similar name exists | |
53 | LL | break while_loop; | |
54 | | ^^^^^^^^^^ | |
55 | | | | |
56 | | not found in this scope | |
57 | | help: use the similarly named label: `'while_loop` | |
58 | ||
59 | error[E0425]: cannot find value `while_let` in this scope | |
60 | --> $DIR/label_misspelled.rs:36:15 | |
61 | | | |
62 | LL | 'while_let: while let Some(_) = Some(()) { | |
63 | | ---------- a label with a similar name exists | |
64 | LL | break while_let; | |
65 | | ^^^^^^^^^ | |
66 | | | | |
67 | | not found in this scope | |
68 | | help: use the similarly named label: `'while_let` | |
69 | ||
70 | error[E0425]: cannot find value `for_loop` in this scope | |
71 | --> $DIR/label_misspelled.rs:40:15 | |
72 | | | |
73 | LL | 'for_loop: for _ in 0..3 { | |
74 | | --------- a label with a similar name exists | |
75 | LL | break for_loop; | |
76 | | ^^^^^^^^ | |
77 | | | | |
78 | | not found in this scope | |
79 | | help: use the similarly named label: `'for_loop` | |
80 | ||
81 | warning: unused label | |
82 | --> $DIR/label_misspelled.rs:4:5 | |
83 | | | |
84 | LL | 'while_loop: while true { | |
85 | | ^^^^^^^^^^^ | |
86 | | | |
87 | note: the lint level is defined here | |
88 | --> $DIR/label_misspelled.rs:1:9 | |
89 | | | |
90 | LL | #![warn(unused_labels)] | |
91 | | ^^^^^^^^^^^^^ | |
fc512014 XL |
92 | |
93 | warning: denote infinite loops with `loop { ... }` | |
5869c6ff | 94 | --> $DIR/label_misspelled.rs:4:5 |
fc512014 XL |
95 | | |
96 | LL | 'while_loop: while true { | |
97 | | ^^^^^^^^^^^^^^^^^^^^^^^ help: use `loop` | |
98 | | | |
99 | = note: `#[warn(while_true)]` on by default | |
100 | ||
5869c6ff XL |
101 | warning: unused label |
102 | --> $DIR/label_misspelled.rs:9:5 | |
103 | | | |
104 | LL | 'while_let: while let Some(_) = Some(()) { | |
105 | | ^^^^^^^^^^ | |
106 | ||
107 | warning: unused label | |
108 | --> $DIR/label_misspelled.rs:14:5 | |
109 | | | |
110 | LL | 'for_loop: for _ in 0..3 { | |
111 | | ^^^^^^^^^ | |
112 | ||
113 | warning: unused label | |
114 | --> $DIR/label_misspelled.rs:19:5 | |
115 | | | |
116 | LL | 'LOOP: loop { | |
117 | | ^^^^^ | |
118 | ||
119 | warning: denote infinite loops with `loop { ... }` | |
120 | --> $DIR/label_misspelled.rs:31:5 | |
121 | | | |
122 | LL | 'while_loop: while true { | |
123 | | ^^^^^^^^^^^^^^^^^^^^^^^ help: use `loop` | |
124 | ||
125 | warning: unused label | |
126 | --> $DIR/label_misspelled.rs:47:5 | |
127 | | | |
128 | LL | 'while_loop: while true { | |
129 | | ^^^^^^^^^^^ | |
130 | ||
131 | warning: denote infinite loops with `loop { ... }` | |
132 | --> $DIR/label_misspelled.rs:47:5 | |
133 | | | |
134 | LL | 'while_loop: while true { | |
135 | | ^^^^^^^^^^^^^^^^^^^^^^^ help: use `loop` | |
136 | ||
137 | warning: unused label | |
138 | --> $DIR/label_misspelled.rs:52:5 | |
139 | | | |
140 | LL | 'while_let: while let Some(_) = Some(()) { | |
141 | | ^^^^^^^^^^ | |
142 | ||
143 | warning: unused label | |
144 | --> $DIR/label_misspelled.rs:57:5 | |
145 | | | |
146 | LL | 'for_loop: for _ in 0..3 { | |
147 | | ^^^^^^^^^ | |
148 | ||
149 | error[E0571]: `break` with value from a `while` loop | |
150 | --> $DIR/label_misspelled.rs:49:9 | |
151 | | | |
152 | LL | 'while_loop: while true { | |
153 | | ----------------------- you can't `break` with a value in a `while` loop | |
154 | LL | | |
155 | LL | break foo; | |
156 | | ^^^^^^^^^ can only break with a value inside `loop` or breakable block | |
157 | | | |
158 | help: use `break` on its own without a value inside this `while` loop | |
159 | | | |
160 | LL | break; | |
94222f64 | 161 | | ~~~~~ |
5869c6ff XL |
162 | help: alternatively, you might have meant to use the available loop label |
163 | | | |
164 | LL | break 'while_loop; | |
94222f64 | 165 | | ~~~~~~~~~~~ |
5869c6ff XL |
166 | |
167 | error[E0571]: `break` with value from a `while` loop | |
168 | --> $DIR/label_misspelled.rs:54:9 | |
169 | | | |
170 | LL | 'while_let: while let Some(_) = Some(()) { | |
171 | | ---------------------------------------- you can't `break` with a value in a `while` loop | |
172 | LL | | |
173 | LL | break foo; | |
174 | | ^^^^^^^^^ can only break with a value inside `loop` or breakable block | |
175 | | | |
176 | help: use `break` on its own without a value inside this `while` loop | |
177 | | | |
178 | LL | break; | |
94222f64 | 179 | | ~~~~~ |
5869c6ff XL |
180 | help: alternatively, you might have meant to use the available loop label |
181 | | | |
182 | LL | break 'while_let; | |
94222f64 | 183 | | ~~~~~~~~~~ |
5869c6ff XL |
184 | |
185 | error[E0571]: `break` with value from a `for` loop | |
186 | --> $DIR/label_misspelled.rs:59:9 | |
187 | | | |
188 | LL | 'for_loop: for _ in 0..3 { | |
189 | | ------------------------ you can't `break` with a value in a `for` loop | |
190 | LL | | |
191 | LL | break foo; | |
192 | | ^^^^^^^^^ can only break with a value inside `loop` or breakable block | |
193 | | | |
194 | help: use `break` on its own without a value inside this `for` loop | |
195 | | | |
196 | LL | break; | |
94222f64 | 197 | | ~~~~~ |
5869c6ff XL |
198 | help: alternatively, you might have meant to use the available loop label |
199 | | | |
200 | LL | break 'for_loop; | |
94222f64 | 201 | | ~~~~~~~~~ |
5869c6ff XL |
202 | |
203 | error: aborting due to 11 previous errors; 10 warnings emitted | |
fc512014 | 204 | |
5869c6ff XL |
205 | Some errors have detailed explanations: E0425, E0571. |
206 | For more information about an error, try `rustc --explain E0425`. |