about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2025-06-15 09:17:15 +0000
committerbors <bors@rust-lang.org>2025-06-15 09:17:15 +0000
commit75e7cf5f85aad82331a38deff24845b63eaf30f3 (patch)
treec24aa939ad67793633229b7a0eaf138ac2e73d30 /tests
parent0cbc0764380630780a275c437260e4d4d5f28c92 (diff)
parentae8ca1f8581e25fabf728e8081779ae199f470aa (diff)
downloadrust-75e7cf5f85aad82331a38deff24845b63eaf30f3.tar.gz
rust-75e7cf5f85aad82331a38deff24845b63eaf30f3.zip
Auto merge of #142398 - fee1-dead-contrib:push-ynxrtswtkyxw, r=oli-obk
early linting: avoid redundant calls to `check_id`

An attempt to address the regression at https://github.com/rust-lang/rust/pull/142240#issuecomment-2964425460

r? `@oli-obk`

cc `@nnethercote` who might have a better understanding of the performance implications
Diffstat (limited to 'tests')
-rw-r--r--tests/ui/label/label_misspelled.stderr24
1 files changed, 12 insertions, 12 deletions
diff --git a/tests/ui/label/label_misspelled.stderr b/tests/ui/label/label_misspelled.stderr
index 3f4020e7be0..9f9d32dce6b 100644
--- a/tests/ui/label/label_misspelled.stderr
+++ b/tests/ui/label/label_misspelled.stderr
@@ -78,6 +78,14 @@ LL |         break for_loop;
    |               not found in this scope
    |               help: use the similarly named label: `'for_loop`
 
+warning: denote infinite loops with `loop { ... }`
+  --> $DIR/label_misspelled.rs:4:5
+   |
+LL |     'while_loop: while true {
+   |     ^^^^^^^^^^^^^^^^^^^^^^^ help: use `loop`
+   |
+   = note: `#[warn(while_true)]` on by default
+
 warning: unused label
   --> $DIR/label_misspelled.rs:4:5
    |
@@ -90,14 +98,6 @@ note: the lint level is defined here
 LL | #![warn(unused_labels)]
    |         ^^^^^^^^^^^^^
 
-warning: denote infinite loops with `loop { ... }`
-  --> $DIR/label_misspelled.rs:4:5
-   |
-LL |     'while_loop: while true {
-   |     ^^^^^^^^^^^^^^^^^^^^^^^ help: use `loop`
-   |
-   = note: `#[warn(while_true)]` on by default
-
 warning: unused label
   --> $DIR/label_misspelled.rs:9:5
    |
@@ -122,17 +122,17 @@ warning: denote infinite loops with `loop { ... }`
 LL |     'while_loop: while true {
    |     ^^^^^^^^^^^^^^^^^^^^^^^ help: use `loop`
 
-warning: unused label
+warning: denote infinite loops with `loop { ... }`
   --> $DIR/label_misspelled.rs:47:5
    |
 LL |     'while_loop: while true {
-   |     ^^^^^^^^^^^
+   |     ^^^^^^^^^^^^^^^^^^^^^^^ help: use `loop`
 
-warning: denote infinite loops with `loop { ... }`
+warning: unused label
   --> $DIR/label_misspelled.rs:47:5
    |
 LL |     'while_loop: while true {
-   |     ^^^^^^^^^^^^^^^^^^^^^^^ help: use `loop`
+   |     ^^^^^^^^^^^
 
 warning: unused label
   --> $DIR/label_misspelled.rs:52:5