about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-08-28 13:36:19 +0000
committerbors <bors@rust-lang.org>2023-08-28 13:36:19 +0000
commitc587fd418521c841f8683c58872293475b8d9b3b (patch)
treeb8e49e81ed59086fb711f977f32e233cb9e7d0d5 /tests
parent9847c6406dc8182abb417b69000fcd0bc5f4a1b7 (diff)
parentdc82736677a134a1b52def496db111681c053e82 (diff)
downloadrust-c587fd418521c841f8683c58872293475b8d9b3b.tar.gz
rust-c587fd418521c841f8683c58872293475b8d9b3b.zip
Auto merge of #114774 - Enselic:less-move-size-noise, r=oli-obk
Avoid duplicate `large_assignments` lints

By checking for overlapping spans.

This PR does the "reduce noisiness" task in #83518.

r? `@oli-obk` who added E-mentor and E-help-wanted and wrote the initial code.

(The fix itself is in https://github.com/rust-lang/rust/pull/114774/commits/dc82736677a134a1b52def496db111681c053e82. The two commits before that are just small refactorings.)
Diffstat (limited to 'tests')
-rw-r--r--tests/ui/async-await/large_moves.attribute.stderr12
-rw-r--r--tests/ui/async-await/large_moves.option.stderr12
-rw-r--r--tests/ui/async-await/large_moves.rs1
3 files changed, 4 insertions, 21 deletions
diff --git a/tests/ui/async-await/large_moves.attribute.stderr b/tests/ui/async-await/large_moves.attribute.stderr
index 94f61caa25d..ef9fd78ffe3 100644
--- a/tests/ui/async-await/large_moves.attribute.stderr
+++ b/tests/ui/async-await/large_moves.attribute.stderr
@@ -12,20 +12,12 @@ LL | #![deny(large_assignments)]
    |         ^^^^^^^^^^^^^^^^^
 
 error: moving 10024 bytes
-  --> $DIR/large_moves.rs:19:13
-   |
-LL |     let z = (x, 42);
-   |             ^^^^^^^ value moved from here
-   |
-   = note: The current maximum size is 1000, but it can be customized with the move_size_limit attribute: `#![move_size_limit = "..."]`
-
-error: moving 10024 bytes
-  --> $DIR/large_moves.rs:21:13
+  --> $DIR/large_moves.rs:20:13
    |
 LL |     let a = z.0;
    |             ^^^ value moved from here
    |
    = note: The current maximum size is 1000, but it can be customized with the move_size_limit attribute: `#![move_size_limit = "..."]`
 
-error: aborting due to 3 previous errors
+error: aborting due to 2 previous errors
 
diff --git a/tests/ui/async-await/large_moves.option.stderr b/tests/ui/async-await/large_moves.option.stderr
index 94f61caa25d..ef9fd78ffe3 100644
--- a/tests/ui/async-await/large_moves.option.stderr
+++ b/tests/ui/async-await/large_moves.option.stderr
@@ -12,20 +12,12 @@ LL | #![deny(large_assignments)]
    |         ^^^^^^^^^^^^^^^^^
 
 error: moving 10024 bytes
-  --> $DIR/large_moves.rs:19:13
-   |
-LL |     let z = (x, 42);
-   |             ^^^^^^^ value moved from here
-   |
-   = note: The current maximum size is 1000, but it can be customized with the move_size_limit attribute: `#![move_size_limit = "..."]`
-
-error: moving 10024 bytes
-  --> $DIR/large_moves.rs:21:13
+  --> $DIR/large_moves.rs:20:13
    |
 LL |     let a = z.0;
    |             ^^^ value moved from here
    |
    = note: The current maximum size is 1000, but it can be customized with the move_size_limit attribute: `#![move_size_limit = "..."]`
 
-error: aborting due to 3 previous errors
+error: aborting due to 2 previous errors
 
diff --git a/tests/ui/async-await/large_moves.rs b/tests/ui/async-await/large_moves.rs
index c8ed6bafe9c..faf6c66c612 100644
--- a/tests/ui/async-await/large_moves.rs
+++ b/tests/ui/async-await/large_moves.rs
@@ -17,7 +17,6 @@ fn main() {
         dbg!(y);
     };
     let z = (x, 42); //~ ERROR large_assignments
-    //~^ ERROR large_assignments
     let a = z.0; //~ ERROR large_assignments
     let b = z.1;
 }