|
| 1 | +error[E0426]: use of undeclared label `'a` |
| 2 | + --> $DIR/label_break_value_invalid.rs:7:19 |
| 3 | + | |
| 4 | +LL | break 'a $val; |
| 5 | + | ^^ undeclared label `'a` |
| 6 | +... |
| 7 | +LL | mac2!(2); |
| 8 | + | -------- in this macro invocation |
| 9 | + | |
| 10 | + = note: this error originates in the macro `mac2` (in Nightly builds, run with -Z macro-backtrace for more info) |
| 11 | + |
| 12 | +error[E0426]: use of undeclared label `'a` |
| 13 | + --> $DIR/label_break_value_invalid.rs:32:19 |
| 14 | + | |
| 15 | +LL | let x: u8 = mac3!('b: { |
| 16 | + | -- a label with a similar name is reachable |
| 17 | +LL | if true { |
| 18 | +LL | break 'a 3; |
| 19 | + | ^^ |
| 20 | + | | |
| 21 | + | undeclared label `'a` |
| 22 | + | help: try using similarly named label: `'b` |
| 23 | + |
| 24 | +error[E0426]: use of undeclared label `'a` |
| 25 | + --> $DIR/label_break_value_invalid.rs:37:29 |
| 26 | + | |
| 27 | +LL | let x: u8 = mac3!(break 'a 4); |
| 28 | + | ^^ undeclared label `'a` |
| 29 | + |
| 30 | +warning: label name `'a` shadows a label name that is already in scope |
| 31 | + --> $DIR/label_break_value_invalid.rs:22:13 |
| 32 | + | |
| 33 | +LL | let x: u8 = 'a: { |
| 34 | + | -- first declared here |
| 35 | +... |
| 36 | +LL | 'a: { |
| 37 | + | ^^ label `'a` already in scope |
| 38 | +... |
| 39 | +LL | let x: u8 = mac3!('b: { |
| 40 | + | _________________- |
| 41 | +LL | | if true { |
| 42 | +LL | | break 'a 3; |
| 43 | +LL | | } |
| 44 | +LL | | 0 |
| 45 | +LL | | }); |
| 46 | + | |______- in this macro invocation |
| 47 | + | |
| 48 | + = note: this warning originates in the macro `mac3` (in Nightly builds, run with -Z macro-backtrace for more info) |
| 49 | + |
| 50 | +warning: label name `'b` shadows a label name that is already in scope |
| 51 | + --> $DIR/label_break_value_invalid.rs:30:23 |
| 52 | + | |
| 53 | +LL | 'b: { |
| 54 | + | -- first declared here |
| 55 | +... |
| 56 | +LL | let x: u8 = mac3!('b: { |
| 57 | + | ^^ label `'b` already in scope |
| 58 | + |
| 59 | +warning: label name `'a` shadows a label name that is already in scope |
| 60 | + --> $DIR/label_break_value_invalid.rs:22:13 |
| 61 | + | |
| 62 | +LL | let x: u8 = 'a: { |
| 63 | + | -- first declared here |
| 64 | +... |
| 65 | +LL | 'a: { |
| 66 | + | ^^ label `'a` already in scope |
| 67 | +... |
| 68 | +LL | let x: u8 = mac3!(break 'a 4); |
| 69 | + | ----------------- in this macro invocation |
| 70 | + | |
| 71 | + = note: this warning originates in the macro `mac3` (in Nightly builds, run with -Z macro-backtrace for more info) |
| 72 | + |
| 73 | +warning: label name `'a` shadows a label name that is already in scope |
| 74 | + --> $DIR/label_break_value_invalid.rs:22:13 |
| 75 | + | |
| 76 | +LL | 'a: { |
| 77 | + | ^^ |
| 78 | + | | |
| 79 | + | first declared here |
| 80 | + | label `'a` already in scope |
| 81 | +... |
| 82 | +LL | let x: u8 = mac3!(break 'a 4); |
| 83 | + | ----------------- in this macro invocation |
| 84 | + | |
| 85 | + = note: this warning originates in the macro `mac3` (in Nightly builds, run with -Z macro-backtrace for more info) |
| 86 | + |
| 87 | +error: aborting due to 3 previous errors; 4 warnings emitted |
| 88 | + |
| 89 | +For more information about this error, try `rustc --explain E0426`. |
0 commit comments