Skip to content

Commit a265c49

Browse files
committed
Rebase fallout.
1 parent be40b58 commit a265c49

File tree

4 files changed

+7
-95
lines changed

4 files changed

+7
-95
lines changed

src/test/ui/for-loop-while/label_break_value.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ fn label_break_match(c: u8, xe: u8, ye: i8) {
102102
0 => break 'a 0,
103103
v if { if v % 2 == 0 { break 'a 1; }; v % 3 == 0 } => { x += 1; },
104104
v if { 'b: { break 'b v == 5; } } => { x = 41; },
105-
_ => 'b: { //~ WARNING `'b` shadows a label
105+
_ => 'b: {
106106
break 'b ();
107107
},
108108
}
@@ -128,8 +128,8 @@ fn label_break_macro() {
128128
0
129129
};
130130
assert_eq!(x, 0);
131-
let x: u8 = 'a: { //~ WARNING `'a` shadows a label
132-
'b: { //~ WARNING `'b` shadows a label
131+
let x: u8 = 'a: {
132+
'b: {
133133
if true {
134134
mac1!('a, 1);
135135
}

src/test/ui/for-loop-while/label_break_value.stderr

-28
This file was deleted.

src/test/ui/for-loop-while/label_break_value_invalid.rs

+1-4
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,11 @@ fn lbv_macro_test_hygiene_respected() {
2020
macro_rules! mac3 {
2121
($val:expr) => {
2222
'a: {
23-
//~^ WARNING `'a` shadows a label
24-
//~| WARNING `'a` shadows a label
25-
//~| WARNING `'a` shadows a label
2623
$val
2724
}
2825
};
2926
}
30-
let x: u8 = mac3!('b: { //~ WARNING `'b` shadows a label
27+
let x: u8 = mac3!('b: {
3128
if true {
3229
break 'a 3; //~ ERROR undeclared label `'a` [E0426]
3330
}

src/test/ui/for-loop-while/label_break_value_invalid.stderr

+3-60
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ LL | mac2!(2);
1010
= note: this error originates in the macro `mac2` (in Nightly builds, run with -Z macro-backtrace for more info)
1111

1212
error[E0426]: use of undeclared label `'a`
13-
--> $DIR/label_break_value_invalid.rs:32:19
13+
--> $DIR/label_break_value_invalid.rs:29:19
1414
|
1515
LL | let x: u8 = mac3!('b: {
1616
| -- a label with a similar name is reachable
@@ -22,68 +22,11 @@ LL | break 'a 3;
2222
| help: try using similarly named label: `'b`
2323

2424
error[E0426]: use of undeclared label `'a`
25-
--> $DIR/label_break_value_invalid.rs:37:29
25+
--> $DIR/label_break_value_invalid.rs:34:29
2626
|
2727
LL | let x: u8 = mac3!(break 'a 4);
2828
| ^^ undeclared label `'a`
2929

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
30+
error: aborting due to 3 previous errors
8831

8932
For more information about this error, try `rustc --explain E0426`.

0 commit comments

Comments
 (0)