summaryrefslogtreecommitdiffstats
path: root/tests/ui/label/label_misspelled.stderr
blob: 4b5b9e92ca09a5ab244ac9c384bf6f525eeb6438 (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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
error[E0425]: cannot find value `while_loop` in this scope
  --> $DIR/label_misspelled.rs:6:9
   |
LL |     'while_loop: while true {
   |     ----------- a label with a similar name exists
LL |
LL |         while_loop;
   |         ^^^^^^^^^^ not found in this scope

error[E0425]: cannot find value `while_let` in this scope
  --> $DIR/label_misspelled.rs:11:9
   |
LL |     'while_let: while let Some(_) = Some(()) {
   |     ---------- a label with a similar name exists
LL |
LL |         while_let;
   |         ^^^^^^^^^ not found in this scope

error[E0425]: cannot find value `for_loop` in this scope
  --> $DIR/label_misspelled.rs:16:9
   |
LL |     'for_loop: for _ in 0..3 {
   |     --------- a label with a similar name exists
LL |
LL |         for_loop;
   |         ^^^^^^^^ not found in this scope

error[E0425]: cannot find value `LOOP` in this scope
  --> $DIR/label_misspelled.rs:21:9
   |
LL |     'LOOP: loop {
   |     ----- a label with a similar name exists
LL |
LL |         LOOP;
   |         ^^^^ not found in this scope

error[E0425]: cannot find value `LOOP` in this scope
  --> $DIR/label_misspelled.rs:28:15
   |
LL |     'LOOP: loop {
   |     ----- a label with a similar name exists
LL |         break LOOP;
   |               ^^^^
   |               |
   |               not found in this scope
   |               help: use the similarly named label: `'LOOP`

error[E0425]: cannot find value `while_loop` in this scope
  --> $DIR/label_misspelled.rs:32:15
   |
LL |     'while_loop: while true {
   |     ----------- a label with a similar name exists
LL |         break while_loop;
   |               ^^^^^^^^^^
   |               |
   |               not found in this scope
   |               help: use the similarly named label: `'while_loop`

error[E0425]: cannot find value `while_let` in this scope
  --> $DIR/label_misspelled.rs:36:15
   |
LL |     'while_let: while let Some(_) = Some(()) {
   |     ---------- a label with a similar name exists
LL |         break while_let;
   |               ^^^^^^^^^
   |               |
   |               not found in this scope
   |               help: use the similarly named label: `'while_let`

error[E0425]: cannot find value `for_loop` in this scope
  --> $DIR/label_misspelled.rs:40:15
   |
LL |     'for_loop: for _ in 0..3 {
   |     --------- a label with a similar name exists
LL |         break for_loop;
   |               ^^^^^^^^
   |               |
   |               not found in this scope
   |               help: use the similarly named label: `'for_loop`

warning: unused label
  --> $DIR/label_misspelled.rs:4:5
   |
LL |     'while_loop: while true {
   |     ^^^^^^^^^^^
   |
note: the lint level is defined here
  --> $DIR/label_misspelled.rs:1:9
   |
LL | #![warn(unused_labels)]
   |         ^^^^^^^^^^^^^

warning: denote infinite loops with `loop { ... }`
  --> $DIR/label_misspelled.rs:4:5
   |
LL |     'while_loop: while true {
   |     ^^^^^^^^^^^^^^^^^^^^^^^ help: use `loop`
   |
   = note: `#[warn(while_true)]` on by default

warning: unused label
  --> $DIR/label_misspelled.rs:9:5
   |
LL |     'while_let: while let Some(_) = Some(()) {
   |     ^^^^^^^^^^

warning: unused label
  --> $DIR/label_misspelled.rs:14:5
   |
LL |     'for_loop: for _ in 0..3 {
   |     ^^^^^^^^^

warning: unused label
  --> $DIR/label_misspelled.rs:19:5
   |
LL |     'LOOP: loop {
   |     ^^^^^

warning: denote infinite loops with `loop { ... }`
  --> $DIR/label_misspelled.rs:31:5
   |
LL |     'while_loop: while true {
   |     ^^^^^^^^^^^^^^^^^^^^^^^ help: use `loop`

warning: unused label
  --> $DIR/label_misspelled.rs:47:5
   |
LL |     'while_loop: while true {
   |     ^^^^^^^^^^^

warning: denote infinite loops with `loop { ... }`
  --> $DIR/label_misspelled.rs:47:5
   |
LL |     'while_loop: while true {
   |     ^^^^^^^^^^^^^^^^^^^^^^^ help: use `loop`

warning: unused label
  --> $DIR/label_misspelled.rs:52:5
   |
LL |     'while_let: while let Some(_) = Some(()) {
   |     ^^^^^^^^^^

warning: unused label
  --> $DIR/label_misspelled.rs:57:5
   |
LL |     'for_loop: for _ in 0..3 {
   |     ^^^^^^^^^

error[E0571]: `break` with value from a `while` loop
  --> $DIR/label_misspelled.rs:49:9
   |
LL |     'while_loop: while true {
   |     ----------------------- you can't `break` with a value in a `while` loop
LL |
LL |         break foo;
   |         ^^^^^^^^^ can only break with a value inside `loop` or breakable block
   |
help: use `break` on its own without a value inside this `while` loop
   |
LL |         break;
   |         ~~~~~
help: alternatively, you might have meant to use the available loop label
   |
LL |         break 'while_loop;
   |               ~~~~~~~~~~~

error[E0571]: `break` with value from a `while` loop
  --> $DIR/label_misspelled.rs:54:9
   |
LL |     'while_let: while let Some(_) = Some(()) {
   |     ---------------------------------------- you can't `break` with a value in a `while` loop
LL |
LL |         break foo;
   |         ^^^^^^^^^ can only break with a value inside `loop` or breakable block
   |
help: use `break` on its own without a value inside this `while` loop
   |
LL |         break;
   |         ~~~~~
help: alternatively, you might have meant to use the available loop label
   |
LL |         break 'while_let;
   |               ~~~~~~~~~~

error[E0571]: `break` with value from a `for` loop
  --> $DIR/label_misspelled.rs:59:9
   |
LL |     'for_loop: for _ in 0..3 {
   |     ------------------------ you can't `break` with a value in a `for` loop
LL |
LL |         break foo;
   |         ^^^^^^^^^ can only break with a value inside `loop` or breakable block
   |
help: use `break` on its own without a value inside this `for` loop
   |
LL |         break;
   |         ~~~~~
help: alternatively, you might have meant to use the available loop label
   |
LL |         break 'for_loop;
   |               ~~~~~~~~~

error: aborting due to 11 previous errors; 10 warnings emitted

Some errors have detailed explanations: E0425, E0571.
For more information about an error, try `rustc --explain E0425`.