about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorCamille GILLOT <gillot.camille@gmail.com>2022-05-05 20:49:48 +0200
committerCamille GILLOT <gillot.camille@gmail.com>2022-06-02 19:24:32 +0200
commita265c49b252a932b06a94d5715013c8311989139 (patch)
tree9b8d02c69f229334a93c1b42800df3ae0dd1065f /src
parentbe40b588953df73a9e766b644b7eac9e7d287b99 (diff)
downloadrust-a265c49b252a932b06a94d5715013c8311989139.tar.gz
rust-a265c49b252a932b06a94d5715013c8311989139.zip
Rebase fallout.
Diffstat (limited to 'src')
-rw-r--r--src/test/ui/for-loop-while/label_break_value.rs6
-rw-r--r--src/test/ui/for-loop-while/label_break_value.stderr28
-rw-r--r--src/test/ui/for-loop-while/label_break_value_invalid.rs5
-rw-r--r--src/test/ui/for-loop-while/label_break_value_invalid.stderr63
4 files changed, 7 insertions, 95 deletions
diff --git a/src/test/ui/for-loop-while/label_break_value.rs b/src/test/ui/for-loop-while/label_break_value.rs
index 5776c0b1e0c..ca9d71a7a8b 100644
--- a/src/test/ui/for-loop-while/label_break_value.rs
+++ b/src/test/ui/for-loop-while/label_break_value.rs
@@ -102,7 +102,7 @@ fn label_break_match(c: u8, xe: u8, ye: i8) {
             0 => break 'a 0,
             v if { if v % 2 == 0 { break 'a 1; }; v % 3 == 0 } => { x += 1; },
             v if { 'b: { break 'b v == 5; } } => { x = 41; },
-            _ => 'b: { //~ WARNING `'b` shadows a label
+            _ => 'b: {
                 break 'b ();
             },
         }
@@ -128,8 +128,8 @@ fn label_break_macro() {
         0
     };
     assert_eq!(x, 0);
-    let x: u8 = 'a: { //~ WARNING `'a` shadows a label
-        'b: { //~ WARNING `'b` shadows a label
+    let x: u8 = 'a: {
+        'b: {
             if true {
                 mac1!('a, 1);
             }
diff --git a/src/test/ui/for-loop-while/label_break_value.stderr b/src/test/ui/for-loop-while/label_break_value.stderr
deleted file mode 100644
index b1eb3204fd5..00000000000
--- a/src/test/ui/for-loop-while/label_break_value.stderr
+++ /dev/null
@@ -1,28 +0,0 @@
-warning: label name `'b` shadows a label name that is already in scope
-  --> $DIR/label_break_value.rs:105:18
-   |
-LL |             v if { 'b: { break 'b v == 5; } } => { x = 41; },
-   |                    -- first declared here
-LL |             _ => 'b: {
-   |                  ^^ label `'b` already in scope
-
-warning: label name `'a` shadows a label name that is already in scope
-  --> $DIR/label_break_value.rs:131:17
-   |
-LL |     let x: u8 = 'a: {
-   |                 -- first declared here
-...
-LL |     let x: u8 = 'a: {
-   |                 ^^ label `'a` already in scope
-
-warning: label name `'b` shadows a label name that is already in scope
-  --> $DIR/label_break_value.rs:132:9
-   |
-LL |         'b: {
-   |         -- first declared here
-...
-LL |         'b: {
-   |         ^^ label `'b` already in scope
-
-warning: 3 warnings emitted
-
diff --git a/src/test/ui/for-loop-while/label_break_value_invalid.rs b/src/test/ui/for-loop-while/label_break_value_invalid.rs
index e603c8463b5..149bf17b83c 100644
--- a/src/test/ui/for-loop-while/label_break_value_invalid.rs
+++ b/src/test/ui/for-loop-while/label_break_value_invalid.rs
@@ -20,14 +20,11 @@ fn lbv_macro_test_hygiene_respected() {
     macro_rules! mac3 {
         ($val:expr) => {
             'a: {
-            //~^ WARNING `'a` shadows a label
-            //~| WARNING `'a` shadows a label
-            //~| WARNING `'a` shadows a label
                 $val
             }
         };
     }
-    let x: u8 = mac3!('b: { //~ WARNING `'b` shadows a label
+    let x: u8 = mac3!('b: {
         if true {
             break 'a 3; //~ ERROR undeclared label `'a` [E0426]
         }
diff --git a/src/test/ui/for-loop-while/label_break_value_invalid.stderr b/src/test/ui/for-loop-while/label_break_value_invalid.stderr
index 549b394e14b..7182b8f598f 100644
--- a/src/test/ui/for-loop-while/label_break_value_invalid.stderr
+++ b/src/test/ui/for-loop-while/label_break_value_invalid.stderr
@@ -10,7 +10,7 @@ LL |                 mac2!(2);
    = note: this error originates in the macro `mac2` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0426]: use of undeclared label `'a`
-  --> $DIR/label_break_value_invalid.rs:32:19
+  --> $DIR/label_break_value_invalid.rs:29:19
    |
 LL |     let x: u8 = mac3!('b: {
    |                       -- a label with a similar name is reachable
@@ -22,68 +22,11 @@ LL |             break 'a 3;
    |                   help: try using similarly named label: `'b`
 
 error[E0426]: use of undeclared label `'a`
-  --> $DIR/label_break_value_invalid.rs:37:29
+  --> $DIR/label_break_value_invalid.rs:34:29
    |
 LL |     let x: u8 = mac3!(break 'a 4);
    |                             ^^ undeclared label `'a`
 
-warning: label name `'a` shadows a label name that is already in scope
-  --> $DIR/label_break_value_invalid.rs:22:13
-   |
-LL |       let x: u8 = 'a: {
-   |                   -- first declared here
-...
-LL |               'a: {
-   |               ^^ label `'a` already in scope
-...
-LL |       let x: u8 = mac3!('b: {
-   |  _________________-
-LL | |         if true {
-LL | |             break 'a 3;
-LL | |         }
-LL | |         0
-LL | |     });
-   | |______- in this macro invocation
-   |
-   = note: this warning originates in the macro `mac3` (in Nightly builds, run with -Z macro-backtrace for more info)
-
-warning: label name `'b` shadows a label name that is already in scope
-  --> $DIR/label_break_value_invalid.rs:30:23
-   |
-LL |         'b: {
-   |         -- first declared here
-...
-LL |     let x: u8 = mac3!('b: {
-   |                       ^^ label `'b` already in scope
-
-warning: label name `'a` shadows a label name that is already in scope
-  --> $DIR/label_break_value_invalid.rs:22:13
-   |
-LL |     let x: u8 = 'a: {
-   |                 -- first declared here
-...
-LL |             'a: {
-   |             ^^ label `'a` already in scope
-...
-LL |     let x: u8 = mac3!(break 'a 4);
-   |                 ----------------- in this macro invocation
-   |
-   = note: this warning originates in the macro `mac3` (in Nightly builds, run with -Z macro-backtrace for more info)
-
-warning: label name `'a` shadows a label name that is already in scope
-  --> $DIR/label_break_value_invalid.rs:22:13
-   |
-LL |             'a: {
-   |             ^^
-   |             |
-   |             first declared here
-   |             label `'a` already in scope
-...
-LL |     let x: u8 = mac3!(break 'a 4);
-   |                 ----------------- in this macro invocation
-   |
-   = note: this warning originates in the macro `mac3` (in Nightly builds, run with -Z macro-backtrace for more info)
-
-error: aborting due to 3 previous errors; 4 warnings emitted
+error: aborting due to 3 previous errors
 
 For more information about this error, try `rustc --explain E0426`.