2020-12-14 06:14:17 -06:00
|
|
|
error[E0425]: cannot find value `while_loop` in this scope
|
2021-01-20 19:50:21 -06:00
|
|
|
--> $DIR/label_misspelled.rs:6:9
|
2020-12-14 06:14:17 -06:00
|
|
|
|
|
2021-01-19 19:51:48 -06:00
|
|
|
LL | 'while_loop: while true {
|
|
|
|
| ----------- a label with a similar name exists
|
2021-01-20 19:50:21 -06:00
|
|
|
LL |
|
2020-12-14 06:14:17 -06:00
|
|
|
LL | while_loop;
|
2021-01-19 19:51:48 -06:00
|
|
|
| ^^^^^^^^^^ not found in this scope
|
2020-12-14 06:14:17 -06:00
|
|
|
|
|
|
|
error[E0425]: cannot find value `while_let` in this scope
|
2021-01-20 19:50:21 -06:00
|
|
|
--> $DIR/label_misspelled.rs:11:9
|
2020-12-14 06:14:17 -06:00
|
|
|
|
|
2021-01-19 19:51:48 -06:00
|
|
|
LL | 'while_let: while let Some(_) = Some(()) {
|
|
|
|
| ---------- a label with a similar name exists
|
2021-01-20 19:50:21 -06:00
|
|
|
LL |
|
2020-12-14 06:14:17 -06:00
|
|
|
LL | while_let;
|
2021-01-19 19:51:48 -06:00
|
|
|
| ^^^^^^^^^ not found in this scope
|
2020-12-14 06:14:17 -06:00
|
|
|
|
|
|
|
error[E0425]: cannot find value `for_loop` in this scope
|
2021-01-20 19:50:21 -06:00
|
|
|
--> $DIR/label_misspelled.rs:16:9
|
2020-12-14 06:14:17 -06:00
|
|
|
|
|
2021-01-19 19:51:48 -06:00
|
|
|
LL | 'for_loop: for _ in 0..3 {
|
|
|
|
| --------- a label with a similar name exists
|
2021-01-20 19:50:21 -06:00
|
|
|
LL |
|
2020-12-14 06:14:17 -06:00
|
|
|
LL | for_loop;
|
2021-01-19 19:51:48 -06:00
|
|
|
| ^^^^^^^^ not found in this scope
|
2020-12-14 06:14:17 -06:00
|
|
|
|
2021-01-20 19:25:27 -06:00
|
|
|
error[E0425]: cannot find value `LOOP` in this scope
|
2021-01-20 19:50:21 -06:00
|
|
|
--> $DIR/label_misspelled.rs:21:9
|
2021-01-20 19:25:27 -06:00
|
|
|
|
|
|
|
|
LL | 'LOOP: loop {
|
|
|
|
| ----- a label with a similar name exists
|
2021-01-20 19:50:21 -06:00
|
|
|
LL |
|
2021-01-20 19:25:27 -06:00
|
|
|
LL | LOOP;
|
|
|
|
| ^^^^ not found in this scope
|
|
|
|
|
2021-01-19 17:51:51 -06:00
|
|
|
error[E0425]: cannot find value `LOOP` in this scope
|
2021-01-20 19:57:47 -06:00
|
|
|
--> $DIR/label_misspelled.rs:28:15
|
2021-01-19 17:51:51 -06:00
|
|
|
|
|
2021-01-19 19:51:48 -06:00
|
|
|
LL | 'LOOP: loop {
|
|
|
|
| ----- a label with a similar name exists
|
2021-01-19 17:51:51 -06:00
|
|
|
LL | break LOOP;
|
|
|
|
| ^^^^
|
|
|
|
| |
|
|
|
|
| not found in this scope
|
2021-01-19 19:51:48 -06:00
|
|
|
| help: use the similarly named label: `'LOOP`
|
2021-01-19 17:51:51 -06:00
|
|
|
|
|
|
|
error[E0425]: cannot find value `while_loop` in this scope
|
2021-01-20 19:57:47 -06:00
|
|
|
--> $DIR/label_misspelled.rs:32:15
|
2021-01-19 17:51:51 -06:00
|
|
|
|
|
2021-01-19 19:51:48 -06:00
|
|
|
LL | 'while_loop: while true {
|
|
|
|
| ----------- a label with a similar name exists
|
2021-01-19 17:51:51 -06:00
|
|
|
LL | break while_loop;
|
|
|
|
| ^^^^^^^^^^
|
|
|
|
| |
|
|
|
|
| not found in this scope
|
2021-01-19 19:51:48 -06:00
|
|
|
| help: use the similarly named label: `'while_loop`
|
2021-01-19 17:51:51 -06:00
|
|
|
|
|
|
|
error[E0425]: cannot find value `while_let` in this scope
|
2021-01-20 19:57:47 -06:00
|
|
|
--> $DIR/label_misspelled.rs:36:15
|
2021-01-19 17:51:51 -06:00
|
|
|
|
|
2021-01-19 19:51:48 -06:00
|
|
|
LL | 'while_let: while let Some(_) = Some(()) {
|
|
|
|
| ---------- a label with a similar name exists
|
2021-01-19 17:51:51 -06:00
|
|
|
LL | break while_let;
|
|
|
|
| ^^^^^^^^^
|
|
|
|
| |
|
|
|
|
| not found in this scope
|
2021-01-19 19:51:48 -06:00
|
|
|
| help: use the similarly named label: `'while_let`
|
2021-01-19 17:51:51 -06:00
|
|
|
|
|
|
|
error[E0425]: cannot find value `for_loop` in this scope
|
2021-01-20 19:57:47 -06:00
|
|
|
--> $DIR/label_misspelled.rs:40:15
|
2021-01-19 17:51:51 -06:00
|
|
|
|
|
2021-01-19 19:51:48 -06:00
|
|
|
LL | 'for_loop: for _ in 0..3 {
|
|
|
|
| --------- a label with a similar name exists
|
2021-01-19 17:51:51 -06:00
|
|
|
LL | break for_loop;
|
|
|
|
| ^^^^^^^^
|
|
|
|
| |
|
|
|
|
| not found in this scope
|
2021-01-19 19:51:48 -06:00
|
|
|
| help: use the similarly named label: `'for_loop`
|
2021-01-19 17:51:51 -06:00
|
|
|
|
2021-01-20 19:50:21 -06:00
|
|
|
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)]
|
|
|
|
| ^^^^^^^^^^^^^
|
|
|
|
|
2020-12-14 06:14:17 -06:00
|
|
|
warning: denote infinite loops with `loop { ... }`
|
2021-01-20 19:50:21 -06:00
|
|
|
--> $DIR/label_misspelled.rs:4:5
|
2020-12-14 06:14:17 -06:00
|
|
|
|
|
|
|
|
LL | 'while_loop: while true {
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^ help: use `loop`
|
|
|
|
|
|
|
|
|
= note: `#[warn(while_true)]` on by default
|
|
|
|
|
2021-01-20 19:50:21 -06:00
|
|
|
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 {
|
|
|
|
| ^^^^^
|
|
|
|
|
2021-01-19 17:51:51 -06:00
|
|
|
warning: denote infinite loops with `loop { ... }`
|
2021-01-20 19:57:47 -06:00
|
|
|
--> $DIR/label_misspelled.rs:31:5
|
2021-01-19 17:51:51 -06:00
|
|
|
|
|
|
|
|
LL | 'while_loop: while true {
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^ help: use `loop`
|
|
|
|
|
2021-01-20 19:50:21 -06:00
|
|
|
warning: unused label
|
2021-01-20 19:57:47 -06:00
|
|
|
--> $DIR/label_misspelled.rs:47:5
|
2021-01-20 19:50:21 -06:00
|
|
|
|
|
|
|
|
LL | 'while_loop: while true {
|
|
|
|
| ^^^^^^^^^^^
|
|
|
|
|
2021-01-20 19:25:27 -06:00
|
|
|
warning: denote infinite loops with `loop { ... }`
|
2021-01-20 19:57:47 -06:00
|
|
|
--> $DIR/label_misspelled.rs:47:5
|
2021-01-20 19:25:27 -06:00
|
|
|
|
|
|
|
|
LL | 'while_loop: while true {
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^ help: use `loop`
|
|
|
|
|
2021-01-20 19:50:21 -06:00
|
|
|
warning: unused label
|
2021-01-20 19:57:47 -06:00
|
|
|
--> $DIR/label_misspelled.rs:52:5
|
2021-01-20 19:50:21 -06:00
|
|
|
|
|
|
|
|
LL | 'while_let: while let Some(_) = Some(()) {
|
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
|
|
|
warning: unused label
|
2021-01-20 19:57:47 -06:00
|
|
|
--> $DIR/label_misspelled.rs:57:5
|
2021-01-20 19:50:21 -06:00
|
|
|
|
|
|
|
|
LL | 'for_loop: for _ in 0..3 {
|
|
|
|
| ^^^^^^^^^
|
|
|
|
|
2021-01-19 17:51:51 -06:00
|
|
|
error[E0571]: `break` with value from a `while` loop
|
2021-01-20 19:57:47 -06:00
|
|
|
--> $DIR/label_misspelled.rs:49:9
|
2021-01-19 17:51:51 -06:00
|
|
|
|
|
2021-01-20 19:25:27 -06:00
|
|
|
LL | 'while_loop: while true {
|
|
|
|
| ----------------------- you can't `break` with a value in a `while` loop
|
2021-01-20 19:50:21 -06:00
|
|
|
LL |
|
2021-01-20 19:25:27 -06:00
|
|
|
LL | break foo;
|
|
|
|
| ^^^^^^^^^ can only break with a value inside `loop` or breakable block
|
2021-01-19 17:51:51 -06:00
|
|
|
|
|
2021-01-20 19:25:27 -06:00
|
|
|
help: use `break` on its own without a value inside this `while` loop
|
2021-01-19 17:51:51 -06:00
|
|
|
|
|
|
|
|
LL | break;
|
2021-06-21 21:07:19 -05:00
|
|
|
| ~~~~~
|
2021-01-20 19:25:27 -06:00
|
|
|
help: alternatively, you might have meant to use the available loop label
|
|
|
|
|
|
|
|
|
LL | break 'while_loop;
|
2021-06-21 21:07:19 -05:00
|
|
|
| ~~~~~~~~~~~
|
2021-01-19 17:51:51 -06:00
|
|
|
|
|
|
|
error[E0571]: `break` with value from a `while` loop
|
2021-01-20 19:57:47 -06:00
|
|
|
--> $DIR/label_misspelled.rs:54:9
|
2021-01-19 17:51:51 -06:00
|
|
|
|
|
2021-01-20 19:25:27 -06:00
|
|
|
LL | 'while_let: while let Some(_) = Some(()) {
|
|
|
|
| ---------------------------------------- you can't `break` with a value in a `while` loop
|
2021-01-20 19:50:21 -06:00
|
|
|
LL |
|
2021-01-20 19:25:27 -06:00
|
|
|
LL | break foo;
|
|
|
|
| ^^^^^^^^^ can only break with a value inside `loop` or breakable block
|
2021-01-19 17:51:51 -06:00
|
|
|
|
|
2021-01-20 19:25:27 -06:00
|
|
|
help: use `break` on its own without a value inside this `while` loop
|
2021-01-19 17:51:51 -06:00
|
|
|
|
|
|
|
|
LL | break;
|
2021-06-21 21:07:19 -05:00
|
|
|
| ~~~~~
|
2021-01-20 19:25:27 -06:00
|
|
|
help: alternatively, you might have meant to use the available loop label
|
|
|
|
|
|
|
|
|
LL | break 'while_let;
|
2021-06-21 21:07:19 -05:00
|
|
|
| ~~~~~~~~~~
|
2021-01-19 17:51:51 -06:00
|
|
|
|
|
|
|
error[E0571]: `break` with value from a `for` loop
|
2021-01-20 19:57:47 -06:00
|
|
|
--> $DIR/label_misspelled.rs:59:9
|
2021-01-19 17:51:51 -06:00
|
|
|
|
|
2021-01-20 19:25:27 -06:00
|
|
|
LL | 'for_loop: for _ in 0..3 {
|
|
|
|
| ------------------------ you can't `break` with a value in a `for` loop
|
2021-01-20 19:50:21 -06:00
|
|
|
LL |
|
2021-01-20 19:25:27 -06:00
|
|
|
LL | break foo;
|
|
|
|
| ^^^^^^^^^ can only break with a value inside `loop` or breakable block
|
2021-01-19 17:51:51 -06:00
|
|
|
|
|
2021-01-20 19:25:27 -06:00
|
|
|
help: use `break` on its own without a value inside this `for` loop
|
2021-01-19 17:51:51 -06:00
|
|
|
|
|
|
|
|
LL | break;
|
2021-06-21 21:07:19 -05:00
|
|
|
| ~~~~~
|
2021-01-20 19:25:27 -06:00
|
|
|
help: alternatively, you might have meant to use the available loop label
|
|
|
|
|
|
|
|
|
LL | break 'for_loop;
|
2021-06-21 21:07:19 -05:00
|
|
|
| ~~~~~~~~~
|
2021-01-19 17:51:51 -06:00
|
|
|
|
2021-01-20 19:57:47 -06:00
|
|
|
error: aborting due to 11 previous errors; 10 warnings emitted
|
2020-12-14 06:14:17 -06:00
|
|
|
|
2021-01-19 17:51:51 -06:00
|
|
|
Some errors have detailed explanations: E0425, E0571.
|
|
|
|
For more information about an error, try `rustc --explain E0425`.
|