about summary refs log tree commit diff
path: root/src/test/ui/lint
diff options
context:
space:
mode:
authorCamille GILLOT <gillot.camille@gmail.com>2021-12-08 22:40:16 +0100
committerCamille GILLOT <gillot.camille@gmail.com>2022-06-02 19:24:10 +0200
commit85cbd0bc185c4b9b36162a638c9ec3915df265b2 (patch)
tree9529cf65e0a106ebbb6363846c7dc9680f1e5699 /src/test/ui/lint
parent6e1b0105c60cfca15930a6fdf8a3b07db528c749 (diff)
downloadrust-85cbd0bc185c4b9b36162a638c9ec3915df265b2.tar.gz
rust-85cbd0bc185c4b9b36162a638c9ec3915df265b2.zip
Bless tests.
Diffstat (limited to 'src/test/ui/lint')
-rw-r--r--src/test/ui/lint/unused_labels.rs1
-rw-r--r--src/test/ui/lint/unused_labels.stderr33
2 files changed, 22 insertions, 12 deletions
diff --git a/src/test/ui/lint/unused_labels.rs b/src/test/ui/lint/unused_labels.rs
index 8a3568f65f6..fb9a9ae2648 100644
--- a/src/test/ui/lint/unused_labels.rs
+++ b/src/test/ui/lint/unused_labels.rs
@@ -61,6 +61,7 @@ fn main() {
         //~^ WARN unused label
         'many_used_shadowed: for _ in 0..10 {
             //~^ WARN label name `'many_used_shadowed` shadows a label name that is already in scope
+            //~| WARN label name `'many_used_shadowed` shadows a label name that is already in scope
             if 1 % 2 == 0 {
                 break 'many_used_shadowed;
             } else {
diff --git a/src/test/ui/lint/unused_labels.stderr b/src/test/ui/lint/unused_labels.stderr
index 4bb1a437d24..ed9287d54a4 100644
--- a/src/test/ui/lint/unused_labels.stderr
+++ b/src/test/ui/lint/unused_labels.stderr
@@ -1,3 +1,21 @@
+warning: label name `'many_used_shadowed` shadows a label name that is already in scope
+  --> $DIR/unused_labels.rs:62:9
+   |
+LL |     'many_used_shadowed: for _ in 0..10 {
+   |     ------------------- first declared here
+LL |
+LL |         'many_used_shadowed: for _ in 0..10 {
+   |         ^^^^^^^^^^^^^^^^^^^ label `'many_used_shadowed` already in scope
+
+warning: label name `'many_used_shadowed` shadows a label name that is already in scope
+  --> $DIR/unused_labels.rs:62:9
+   |
+LL |     'many_used_shadowed: for _ in 0..10 {
+   |     ------------------- first declared here
+LL |
+LL |         'many_used_shadowed: for _ in 0..10 {
+   |         ^^^^^^^^^^^^^^^^^^^ label `'many_used_shadowed` already in scope
+
 warning: unused label
   --> $DIR/unused_labels.rs:11:5
    |
@@ -41,25 +59,16 @@ LL |     'many_used_shadowed: for _ in 0..10 {
    |     ^^^^^^^^^^^^^^^^^^^
 
 warning: unused label
-  --> $DIR/unused_labels.rs:72:5
+  --> $DIR/unused_labels.rs:73:5
    |
 LL |     'unused_loop_label: loop {
    |     ^^^^^^^^^^^^^^^^^^
 
 warning: unused label
-  --> $DIR/unused_labels.rs:78:5
+  --> $DIR/unused_labels.rs:79:5
    |
 LL |     'unused_block_label: {
    |     ^^^^^^^^^^^^^^^^^^^
 
-warning: label name `'many_used_shadowed` shadows a label name that is already in scope
-  --> $DIR/unused_labels.rs:62:9
-   |
-LL |     'many_used_shadowed: for _ in 0..10 {
-   |     ------------------- first declared here
-LL |
-LL |         'many_used_shadowed: for _ in 0..10 {
-   |         ^^^^^^^^^^^^^^^^^^^ label `'many_used_shadowed` already in scope
-
-warning: 9 warnings emitted
+warning: 10 warnings emitted