about summary refs log tree commit diff
diff options
context:
space:
mode:
authorUrgau <urgau@numericable.fr>2023-03-29 22:18:20 +0200
committerUrgau <urgau@numericable.fr>2023-05-10 19:36:02 +0200
commit61ff2718f76ac1ea0669938a06babfd578fadd46 (patch)
tree7d90536b4173c04ece9cc0a94c45a9a278b10782
parent3f81b6b8a20378dcb507bf3f6d9afc76494d7933 (diff)
downloadrust-61ff2718f76ac1ea0669938a06babfd578fadd46.tar.gz
rust-61ff2718f76ac1ea0669938a06babfd578fadd46.zip
Adjust tests for new drop and forget lints
-rw-r--r--src/tools/miri/tests/fail/stacked_borrows/illegal_write2.rs2
-rw-r--r--src/tools/miri/tests/fail/uninit_buffer.rs2
-rw-r--r--src/tools/miri/tests/fail/uninit_buffer_with_provenance.rs2
-rw-r--r--src/tools/miri/tests/pass/stacked-borrows/zst-field-retagging-terminates.rs3
-rw-r--r--tests/ui/associated-inherent-types/inference.rs1
-rw-r--r--tests/ui/async-await/multiple-lifetimes/partial-relation.rs2
-rw-r--r--tests/ui/borrowck/borrowck-closures-slice-patterns-ok.rs1
-rw-r--r--tests/ui/borrowck/borrowck-field-sensitivity-rpass.rs1
-rw-r--r--tests/ui/borrowck/borrowck-use-mut-borrow-rpass.rs2
-rw-r--r--tests/ui/closures/2229_closure_analysis/migrations/issue-78720.rs1
-rw-r--r--tests/ui/closures/2229_closure_analysis/migrations/issue-78720.stderr2
-rw-r--r--tests/ui/closures/2229_closure_analysis/optimization/edge_case_run_pass.rs1
-rw-r--r--tests/ui/closures/2229_closure_analysis/run_pass/drop_then_use_fake_reads.rs2
-rw-r--r--tests/ui/consts/const_forget.rs2
-rw-r--r--tests/ui/consts/issue-104155.rs3
-rw-r--r--tests/ui/crate-leading-sep.rs2
-rw-r--r--tests/ui/drop/repeat-drop.rs2
-rw-r--r--tests/ui/explicit/explicit-call-to-supertrait-dtor.fixed3
-rw-r--r--tests/ui/explicit/explicit-call-to-supertrait-dtor.rs3
-rw-r--r--tests/ui/explicit/explicit-call-to-supertrait-dtor.stderr2
-rw-r--r--tests/ui/feature-gates/feature-gate-unsafe_pin_internals.rs1
-rw-r--r--tests/ui/generator/drop-env.rs1
-rw-r--r--tests/ui/generator/issue-57017.no_drop_tracking.stderr42
-rw-r--r--tests/ui/generator/issue-57017.rs1
-rw-r--r--tests/ui/generator/non-static-is-unpin.rs1
-rw-r--r--tests/ui/generator/resume-arg-size.rs1
-rw-r--r--tests/ui/hygiene/stdlib-prelude-from-opaque-late.rs1
-rw-r--r--tests/ui/illegal-ufcs-drop.fixed3
-rw-r--r--tests/ui/illegal-ufcs-drop.rs3
-rw-r--r--tests/ui/illegal-ufcs-drop.stderr2
-rw-r--r--tests/ui/liveness/liveness-unused.rs2
-rw-r--r--tests/ui/macros/parse-complex-macro-invoc-op.rs1
-rw-r--r--tests/ui/never_type/never-assign-dead-code.rs1
-rw-r--r--tests/ui/never_type/never-assign-dead-code.stderr8
-rw-r--r--tests/ui/nll/relate_tys/hr-fn-aba-as-aaa.rs2
-rw-r--r--tests/ui/nll/ty-outlives/projection-body.rs2
-rw-r--r--tests/ui/or-patterns/or-patterns-default-binding-modes.rs2
-rw-r--r--tests/ui/pattern/bindings-after-at/borrowck-pat-at-and-box-pass.rs3
-rw-r--r--tests/ui/pattern/bindings-after-at/borrowck-pat-by-copy-bindings-in-at.rs2
-rw-r--r--tests/ui/pattern/move-ref-patterns/borrowck-move-ref-pattern-pass.rs2
-rw-r--r--tests/ui/pattern/move-ref-patterns/move-ref-patterns-closure-captures-pass.rs2
-rw-r--r--tests/ui/print_type_sizes/async.rs2
-rw-r--r--tests/ui/print_type_sizes/async.stdout8
-rw-r--r--tests/ui/print_type_sizes/generator_discr_placement.rs1
-rw-r--r--tests/ui/print_type_sizes/generator_discr_placement.stdout2
-rw-r--r--tests/ui/regions/type-param-outlives-reempty-issue-74429-2.rs6
-rw-r--r--tests/ui/regions/type-param-outlives-reempty-issue-74429.rs2
-rw-r--r--tests/ui/rfc-2008-non-exhaustive/borrowck-exhaustive.rs2
-rw-r--r--tests/ui/rfc-2361-dbg-macro/dbg-macro-expected-behavior.rs2
-rw-r--r--tests/ui/rfc-2361-dbg-macro/dbg-macro-expected-behavior.run.stderr30
-rw-r--r--tests/ui/rust-2018/remove-extern-crate.fixed1
-rw-r--r--tests/ui/rust-2018/remove-extern-crate.rs1
-rw-r--r--tests/ui/rust-2018/remove-extern-crate.stderr6
-rw-r--r--tests/ui/statics/issue-91050-1.rs2
-rw-r--r--tests/ui/traits/copy-guessing.rs3
-rw-r--r--tests/ui/traits/impl-evaluation-order.rs2
-rw-r--r--tests/ui/traits/new-solver/auto-with-drop_tracking_mir.fail.stderr4
-rw-r--r--tests/ui/traits/new-solver/auto-with-drop_tracking_mir.rs1
-rw-r--r--tests/ui/traits/new-solver/temporary-ambiguity.rs2
-rw-r--r--tests/ui/trivial-bounds/trivial-bounds-inconsistent-copy.rs2
-rw-r--r--tests/ui/trivial-bounds/trivial-bounds-inconsistent-copy.stderr8
61 files changed, 145 insertions, 64 deletions
diff --git a/src/tools/miri/tests/fail/stacked_borrows/illegal_write2.rs b/src/tools/miri/tests/fail/stacked_borrows/illegal_write2.rs
index 70c51e671fe..bf4204c61fd 100644
--- a/src/tools/miri/tests/fail/stacked_borrows/illegal_write2.rs
+++ b/src/tools/miri/tests/fail/stacked_borrows/illegal_write2.rs
@@ -1,3 +1,5 @@
+#![allow(drop_ref)]
+
 fn main() {
     let target = &mut 42;
     let target2 = target as *mut _;
diff --git a/src/tools/miri/tests/fail/uninit_buffer.rs b/src/tools/miri/tests/fail/uninit_buffer.rs
index d21371225e5..c084dea20bd 100644
--- a/src/tools/miri/tests/fail/uninit_buffer.rs
+++ b/src/tools/miri/tests/fail/uninit_buffer.rs
@@ -1,5 +1,7 @@
 //@error-pattern: memory is uninitialized at [0x4..0x10]
 
+#![allow(drop_copy)]
+
 use std::alloc::{alloc, dealloc, Layout};
 use std::slice::from_raw_parts;
 
diff --git a/src/tools/miri/tests/fail/uninit_buffer_with_provenance.rs b/src/tools/miri/tests/fail/uninit_buffer_with_provenance.rs
index 170bc6e1ed1..1eccc483612 100644
--- a/src/tools/miri/tests/fail/uninit_buffer_with_provenance.rs
+++ b/src/tools/miri/tests/fail/uninit_buffer_with_provenance.rs
@@ -2,6 +2,8 @@
 //@normalize-stderr-test: "a[0-9]+" -> "ALLOC"
 #![feature(strict_provenance)]
 
+#![allow(drop_copy)]
+
 // Test printing allocations that contain single-byte provenance.
 
 use std::alloc::{alloc, dealloc, Layout};
diff --git a/src/tools/miri/tests/pass/stacked-borrows/zst-field-retagging-terminates.rs b/src/tools/miri/tests/pass/stacked-borrows/zst-field-retagging-terminates.rs
index ce3c8b7d5f1..9f743f0b566 100644
--- a/src/tools/miri/tests/pass/stacked-borrows/zst-field-retagging-terminates.rs
+++ b/src/tools/miri/tests/pass/stacked-borrows/zst-field-retagging-terminates.rs
@@ -1,5 +1,8 @@
 //@compile-flags: -Zmiri-retag-fields
 // Checks that the test does not run forever (which relies on a fast path).
+
+#![allow(drop_copy)]
+
 fn main() {
     let array = [(); usize::MAX];
     drop(array); // Pass the array to a function, retagging its fields
diff --git a/tests/ui/associated-inherent-types/inference.rs b/tests/ui/associated-inherent-types/inference.rs
index 38179214fa1..7d6d26003f6 100644
--- a/tests/ui/associated-inherent-types/inference.rs
+++ b/tests/ui/associated-inherent-types/inference.rs
@@ -3,6 +3,7 @@
 
 #![feature(inherent_associated_types)]
 #![allow(incomplete_features)]
+#![allow(drop_copy)]
 
 use std::convert::identity;
 
diff --git a/tests/ui/async-await/multiple-lifetimes/partial-relation.rs b/tests/ui/async-await/multiple-lifetimes/partial-relation.rs
index 02b105999f5..7375cb6d3a0 100644
--- a/tests/ui/async-await/multiple-lifetimes/partial-relation.rs
+++ b/tests/ui/async-await/multiple-lifetimes/partial-relation.rs
@@ -4,7 +4,7 @@
 async fn lotsa_lifetimes<'a, 'b, 'c>(a: &'a u32, b: &'b u32, c: &'c u32) -> (&'a u32, &'b u32)
     where 'b: 'a
 {
-    drop((a, c));
+    let _ = (a, c);
     (b, b)
 }
 
diff --git a/tests/ui/borrowck/borrowck-closures-slice-patterns-ok.rs b/tests/ui/borrowck/borrowck-closures-slice-patterns-ok.rs
index 0229ca37a69..9163c8ed6fb 100644
--- a/tests/ui/borrowck/borrowck-closures-slice-patterns-ok.rs
+++ b/tests/ui/borrowck/borrowck-closures-slice-patterns-ok.rs
@@ -1,6 +1,7 @@
 // Check that closure captures for slice patterns are inferred correctly
 
 #![allow(unused_variables)]
+#![allow(drop_ref)]
 
 // run-pass
 
diff --git a/tests/ui/borrowck/borrowck-field-sensitivity-rpass.rs b/tests/ui/borrowck/borrowck-field-sensitivity-rpass.rs
index dd6708582c1..a88b323e0bf 100644
--- a/tests/ui/borrowck/borrowck-field-sensitivity-rpass.rs
+++ b/tests/ui/borrowck/borrowck-field-sensitivity-rpass.rs
@@ -1,6 +1,7 @@
 // run-pass
 #![allow(unused_mut)]
 #![allow(unused_variables)]
+#![allow(drop_copy)]
 // pretty-expanded FIXME #23616
 
 struct A { a: isize, b: Box<isize> }
diff --git a/tests/ui/borrowck/borrowck-use-mut-borrow-rpass.rs b/tests/ui/borrowck/borrowck-use-mut-borrow-rpass.rs
index 1cf763f66fd..40c6bfeeb43 100644
--- a/tests/ui/borrowck/borrowck-use-mut-borrow-rpass.rs
+++ b/tests/ui/borrowck/borrowck-use-mut-borrow-rpass.rs
@@ -1,6 +1,8 @@
 // run-pass
 // pretty-expanded FIXME #23616
 
+#![allow(drop_copy)]
+
 struct A { a: isize, b: Box<isize> }
 
 fn field_copy_after_field_borrow() {
diff --git a/tests/ui/closures/2229_closure_analysis/migrations/issue-78720.rs b/tests/ui/closures/2229_closure_analysis/migrations/issue-78720.rs
index ff5d284614b..bc7295a0826 100644
--- a/tests/ui/closures/2229_closure_analysis/migrations/issue-78720.rs
+++ b/tests/ui/closures/2229_closure_analysis/migrations/issue-78720.rs
@@ -1,6 +1,7 @@
 // run-pass
 
 #![warn(rust_2021_incompatible_closure_captures)]
+#![allow(drop_ref, drop_copy)]
 
 fn main() {
     if let a = "" {
diff --git a/tests/ui/closures/2229_closure_analysis/migrations/issue-78720.stderr b/tests/ui/closures/2229_closure_analysis/migrations/issue-78720.stderr
index 36a80e694e8..2609e2951ec 100644
--- a/tests/ui/closures/2229_closure_analysis/migrations/issue-78720.stderr
+++ b/tests/ui/closures/2229_closure_analysis/migrations/issue-78720.stderr
@@ -1,5 +1,5 @@
 warning: irrefutable `if let` pattern
-  --> $DIR/issue-78720.rs:6:8
+  --> $DIR/issue-78720.rs:7:8
    |
 LL |     if let a = "" {
    |        ^^^^^^^^^^
diff --git a/tests/ui/closures/2229_closure_analysis/optimization/edge_case_run_pass.rs b/tests/ui/closures/2229_closure_analysis/optimization/edge_case_run_pass.rs
index 033fd6f1775..0f15f664e75 100644
--- a/tests/ui/closures/2229_closure_analysis/optimization/edge_case_run_pass.rs
+++ b/tests/ui/closures/2229_closure_analysis/optimization/edge_case_run_pass.rs
@@ -3,6 +3,7 @@
 
 #![allow(unused)]
 #![allow(dead_code)]
+#![allow(drop_ref)]
 
 struct Int(i32);
 struct B<'a>(&'a i32);
diff --git a/tests/ui/closures/2229_closure_analysis/run_pass/drop_then_use_fake_reads.rs b/tests/ui/closures/2229_closure_analysis/run_pass/drop_then_use_fake_reads.rs
index 477fdd613f5..a097424a021 100644
--- a/tests/ui/closures/2229_closure_analysis/run_pass/drop_then_use_fake_reads.rs
+++ b/tests/ui/closures/2229_closure_analysis/run_pass/drop_then_use_fake_reads.rs
@@ -1,6 +1,8 @@
 // edition:2021
 // check-pass
+
 #![feature(rustc_attrs)]
+#![allow(drop_ref)]
 
 fn main() {
     let mut x = 1;
diff --git a/tests/ui/consts/const_forget.rs b/tests/ui/consts/const_forget.rs
index ec7dde8c9ec..acdd6a54cf4 100644
--- a/tests/ui/consts/const_forget.rs
+++ b/tests/ui/consts/const_forget.rs
@@ -1,5 +1,7 @@
 // check-pass
 
+#![allow(forget_copy)]
+
 use std::mem::forget;
 
 const _: () = forget(0i32);
diff --git a/tests/ui/consts/issue-104155.rs b/tests/ui/consts/issue-104155.rs
index 1cc8f81b0d2..b3821f467b6 100644
--- a/tests/ui/consts/issue-104155.rs
+++ b/tests/ui/consts/issue-104155.rs
@@ -1,4 +1,7 @@
 // check-pass
+
+#![allow(forget_copy)]
+
 const _: () = core::mem::forget(Box::<u32>::default);
 const _: () = core::mem::forget(|| Box::<u32>::default());
 
diff --git a/tests/ui/crate-leading-sep.rs b/tests/ui/crate-leading-sep.rs
index ca5905fab41..8d1d0b4fcdf 100644
--- a/tests/ui/crate-leading-sep.rs
+++ b/tests/ui/crate-leading-sep.rs
@@ -1,6 +1,8 @@
 // run-pass
 // pretty-expanded FIXME #23616
 
+#![allow(drop_copy)]
+
 fn main() {
     use ::std::mem;
     mem::drop(2_usize);
diff --git a/tests/ui/drop/repeat-drop.rs b/tests/ui/drop/repeat-drop.rs
index 8fd46ecaf44..659d35db657 100644
--- a/tests/ui/drop/repeat-drop.rs
+++ b/tests/ui/drop/repeat-drop.rs
@@ -1,6 +1,8 @@
 // run-pass
 // needs-unwind
 
+#![allow(drop_ref, drop_copy)]
+
 static mut CHECK: usize = 0;
 
 struct DropChecker(usize);
diff --git a/tests/ui/explicit/explicit-call-to-supertrait-dtor.fixed b/tests/ui/explicit/explicit-call-to-supertrait-dtor.fixed
index 47c4c9f67b6..0bc4feed329 100644
--- a/tests/ui/explicit/explicit-call-to-supertrait-dtor.fixed
+++ b/tests/ui/explicit/explicit-call-to-supertrait-dtor.fixed
@@ -1,4 +1,7 @@
 // run-rustfix
+
+#![allow(drop_ref)]
+
 struct Foo {
     x: isize
 }
diff --git a/tests/ui/explicit/explicit-call-to-supertrait-dtor.rs b/tests/ui/explicit/explicit-call-to-supertrait-dtor.rs
index c698de50c75..26ae6698d66 100644
--- a/tests/ui/explicit/explicit-call-to-supertrait-dtor.rs
+++ b/tests/ui/explicit/explicit-call-to-supertrait-dtor.rs
@@ -1,4 +1,7 @@
 // run-rustfix
+
+#![allow(drop_ref)]
+
 struct Foo {
     x: isize
 }
diff --git a/tests/ui/explicit/explicit-call-to-supertrait-dtor.stderr b/tests/ui/explicit/explicit-call-to-supertrait-dtor.stderr
index 7f5106eb57e..c7067117349 100644
--- a/tests/ui/explicit/explicit-call-to-supertrait-dtor.stderr
+++ b/tests/ui/explicit/explicit-call-to-supertrait-dtor.stderr
@@ -1,5 +1,5 @@
 error[E0040]: explicit use of destructor method
-  --> $DIR/explicit-call-to-supertrait-dtor.rs:19:14
+  --> $DIR/explicit-call-to-supertrait-dtor.rs:22:14
    |
 LL |         self.drop();
    |         -----^^^^--
diff --git a/tests/ui/feature-gates/feature-gate-unsafe_pin_internals.rs b/tests/ui/feature-gates/feature-gate-unsafe_pin_internals.rs
index 0680d234403..dce94c9eab2 100644
--- a/tests/ui/feature-gates/feature-gate-unsafe_pin_internals.rs
+++ b/tests/ui/feature-gates/feature-gate-unsafe_pin_internals.rs
@@ -13,5 +13,4 @@ fn non_unsafe_pin_new_unchecked<T>(pointer: &mut T) -> Pin<&mut T> {
 fn main() {
     let mut self_referential = PhantomPinned;
     let _: Pin<&mut PhantomPinned> = non_unsafe_pin_new_unchecked(&mut self_referential);
-    core::mem::forget(self_referential); // move and disable drop glue!
 }
diff --git a/tests/ui/generator/drop-env.rs b/tests/ui/generator/drop-env.rs
index 66dfb8c2c09..cb46953dac3 100644
--- a/tests/ui/generator/drop-env.rs
+++ b/tests/ui/generator/drop-env.rs
@@ -4,6 +4,7 @@
 //[nomiropt]compile-flags: -Z mir-opt-level=0
 
 #![feature(generators, generator_trait)]
+#![allow(drop_copy)]
 
 use std::ops::Generator;
 use std::pin::Pin;
diff --git a/tests/ui/generator/issue-57017.no_drop_tracking.stderr b/tests/ui/generator/issue-57017.no_drop_tracking.stderr
index 06d2d23b9ef..f7b8e198cc4 100644
--- a/tests/ui/generator/issue-57017.no_drop_tracking.stderr
+++ b/tests/ui/generator/issue-57017.no_drop_tracking.stderr
@@ -1,5 +1,5 @@
 error: generator cannot be sent between threads safely
-  --> $DIR/issue-57017.rs:31:25
+  --> $DIR/issue-57017.rs:32:25
    |
 LL |               assert_send(g);
    |                           ^ generator is not `Send`
@@ -15,7 +15,7 @@ LL | |     );
    |
    = help: the trait `Sync` is not implemented for `copy::unsync::Client`
 note: generator is not `Send` as this value is used across a yield
-  --> $DIR/issue-57017.rs:29:28
+  --> $DIR/issue-57017.rs:30:28
    |
 LL |               let g = move || match drop(&$name::unsync::Client::default()) {
    |                                          --------------------------------- has type `&copy::unsync::Client` which is not `Send`
@@ -33,14 +33,14 @@ LL | |         }
 LL | |     );
    | |_____- in this macro invocation
 note: required by a bound in `assert_send`
-  --> $DIR/issue-57017.rs:51:19
+  --> $DIR/issue-57017.rs:52:19
    |
 LL | fn assert_send<T: Send>(_thing: T) {}
    |                   ^^^^ required by this bound in `assert_send`
    = note: this error originates in the macro `type_combinations` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: generator cannot be sent between threads safely
-  --> $DIR/issue-57017.rs:43:25
+  --> $DIR/issue-57017.rs:44:25
    |
 LL |               assert_send(g);
    |                           ^ generator is not `Send`
@@ -54,9 +54,9 @@ LL | |         }
 LL | |     );
    | |_____- in this macro invocation
    |
-   = help: within `[generator@$DIR/issue-57017.rs:40:21: 40:28]`, the trait `Send` is not implemented for `copy::unsend::Client`
+   = help: within `[generator@$DIR/issue-57017.rs:41:21: 41:28]`, the trait `Send` is not implemented for `copy::unsend::Client`
 note: generator is not `Send` as this value is used across a yield
-  --> $DIR/issue-57017.rs:41:28
+  --> $DIR/issue-57017.rs:42:28
    |
 LL |               let g = move || match drop($name::unsend::Client::default()) {
    |                                          -------------------------------- has type `copy::unsend::Client` which is not `Send`
@@ -74,14 +74,14 @@ LL | |         }
 LL | |     );
    | |_____- in this macro invocation
 note: required by a bound in `assert_send`
-  --> $DIR/issue-57017.rs:51:19
+  --> $DIR/issue-57017.rs:52:19
    |
 LL | fn assert_send<T: Send>(_thing: T) {}
    |                   ^^^^ required by this bound in `assert_send`
    = note: this error originates in the macro `type_combinations` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: generator cannot be sent between threads safely
-  --> $DIR/issue-57017.rs:31:25
+  --> $DIR/issue-57017.rs:32:25
    |
 LL |               assert_send(g);
    |                           ^ generator is not `Send`
@@ -97,7 +97,7 @@ LL | |     );
    |
    = help: the trait `Sync` is not implemented for `derived_drop::unsync::Client`
 note: generator is not `Send` as this value is used across a yield
-  --> $DIR/issue-57017.rs:29:28
+  --> $DIR/issue-57017.rs:30:28
    |
 LL |               let g = move || match drop(&$name::unsync::Client::default()) {
    |                                          --------------------------------- has type `&derived_drop::unsync::Client` which is not `Send`
@@ -115,14 +115,14 @@ LL | |         }
 LL | |     );
    | |_____- in this macro invocation
 note: required by a bound in `assert_send`
-  --> $DIR/issue-57017.rs:51:19
+  --> $DIR/issue-57017.rs:52:19
    |
 LL | fn assert_send<T: Send>(_thing: T) {}
    |                   ^^^^ required by this bound in `assert_send`
    = note: this error originates in the macro `type_combinations` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: generator cannot be sent between threads safely
-  --> $DIR/issue-57017.rs:43:25
+  --> $DIR/issue-57017.rs:44:25
    |
 LL |               assert_send(g);
    |                           ^ generator is not `Send`
@@ -136,9 +136,9 @@ LL | |         }
 LL | |     );
    | |_____- in this macro invocation
    |
-   = help: within `[generator@$DIR/issue-57017.rs:40:21: 40:28]`, the trait `Send` is not implemented for `derived_drop::unsend::Client`
+   = help: within `[generator@$DIR/issue-57017.rs:41:21: 41:28]`, the trait `Send` is not implemented for `derived_drop::unsend::Client`
 note: generator is not `Send` as this value is used across a yield
-  --> $DIR/issue-57017.rs:41:28
+  --> $DIR/issue-57017.rs:42:28
    |
 LL |               let g = move || match drop($name::unsend::Client::default()) {
    |                                          -------------------------------- has type `derived_drop::unsend::Client` which is not `Send`
@@ -156,14 +156,14 @@ LL | |         }
 LL | |     );
    | |_____- in this macro invocation
 note: required by a bound in `assert_send`
-  --> $DIR/issue-57017.rs:51:19
+  --> $DIR/issue-57017.rs:52:19
    |
 LL | fn assert_send<T: Send>(_thing: T) {}
    |                   ^^^^ required by this bound in `assert_send`
    = note: this error originates in the macro `type_combinations` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: generator cannot be sent between threads safely
-  --> $DIR/issue-57017.rs:31:25
+  --> $DIR/issue-57017.rs:32:25
    |
 LL |               assert_send(g);
    |                           ^ generator is not `Send`
@@ -179,7 +179,7 @@ LL | |     );
    |
    = help: the trait `Sync` is not implemented for `significant_drop::unsync::Client`
 note: generator is not `Send` as this value is used across a yield
-  --> $DIR/issue-57017.rs:29:28
+  --> $DIR/issue-57017.rs:30:28
    |
 LL |               let g = move || match drop(&$name::unsync::Client::default()) {
    |                                          --------------------------------- has type `&significant_drop::unsync::Client` which is not `Send`
@@ -197,14 +197,14 @@ LL | |         }
 LL | |     );
    | |_____- in this macro invocation
 note: required by a bound in `assert_send`
-  --> $DIR/issue-57017.rs:51:19
+  --> $DIR/issue-57017.rs:52:19
    |
 LL | fn assert_send<T: Send>(_thing: T) {}
    |                   ^^^^ required by this bound in `assert_send`
    = note: this error originates in the macro `type_combinations` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: generator cannot be sent between threads safely
-  --> $DIR/issue-57017.rs:43:25
+  --> $DIR/issue-57017.rs:44:25
    |
 LL |               assert_send(g);
    |                           ^ generator is not `Send`
@@ -218,9 +218,9 @@ LL | |         }
 LL | |     );
    | |_____- in this macro invocation
    |
-   = help: within `[generator@$DIR/issue-57017.rs:40:21: 40:28]`, the trait `Send` is not implemented for `significant_drop::unsend::Client`
+   = help: within `[generator@$DIR/issue-57017.rs:41:21: 41:28]`, the trait `Send` is not implemented for `significant_drop::unsend::Client`
 note: generator is not `Send` as this value is used across a yield
-  --> $DIR/issue-57017.rs:41:28
+  --> $DIR/issue-57017.rs:42:28
    |
 LL |               let g = move || match drop($name::unsend::Client::default()) {
    |                                          -------------------------------- has type `significant_drop::unsend::Client` which is not `Send`
@@ -238,7 +238,7 @@ LL | |         }
 LL | |     );
    | |_____- in this macro invocation
 note: required by a bound in `assert_send`
-  --> $DIR/issue-57017.rs:51:19
+  --> $DIR/issue-57017.rs:52:19
    |
 LL | fn assert_send<T: Send>(_thing: T) {}
    |                   ^^^^ required by this bound in `assert_send`
diff --git a/tests/ui/generator/issue-57017.rs b/tests/ui/generator/issue-57017.rs
index 03b00ac99ad..918d233bf4e 100644
--- a/tests/ui/generator/issue-57017.rs
+++ b/tests/ui/generator/issue-57017.rs
@@ -5,6 +5,7 @@
 // [drop_tracking_mir] build-pass
 
 #![feature(generators, negative_impls)]
+#![allow(drop_ref, drop_copy)]
 
 macro_rules! type_combinations {
     (
diff --git a/tests/ui/generator/non-static-is-unpin.rs b/tests/ui/generator/non-static-is-unpin.rs
index 17e23f5bcd2..adba800e25a 100644
--- a/tests/ui/generator/non-static-is-unpin.rs
+++ b/tests/ui/generator/non-static-is-unpin.rs
@@ -3,6 +3,7 @@
 // run-pass
 
 #![feature(generators, generator_trait)]
+#![allow(drop_copy)]
 
 use std::marker::{PhantomPinned, Unpin};
 
diff --git a/tests/ui/generator/resume-arg-size.rs b/tests/ui/generator/resume-arg-size.rs
index b93dc54f7a9..19618f8d0aa 100644
--- a/tests/ui/generator/resume-arg-size.rs
+++ b/tests/ui/generator/resume-arg-size.rs
@@ -1,4 +1,5 @@
 #![feature(generators)]
+#![allow(drop_copy)]
 
 // run-pass
 
diff --git a/tests/ui/hygiene/stdlib-prelude-from-opaque-late.rs b/tests/ui/hygiene/stdlib-prelude-from-opaque-late.rs
index cf65de2bc23..214267372bf 100644
--- a/tests/ui/hygiene/stdlib-prelude-from-opaque-late.rs
+++ b/tests/ui/hygiene/stdlib-prelude-from-opaque-late.rs
@@ -1,6 +1,7 @@
 // check-pass
 
 #![feature(decl_macro)]
+#![allow(drop_copy)]
 
 macro mac() {
     mod m {
diff --git a/tests/ui/illegal-ufcs-drop.fixed b/tests/ui/illegal-ufcs-drop.fixed
index d73b391be06..8783682dec4 100644
--- a/tests/ui/illegal-ufcs-drop.fixed
+++ b/tests/ui/illegal-ufcs-drop.fixed
@@ -1,4 +1,7 @@
 // run-rustfix
+
+#![allow(drop_ref)]
+
 struct Foo;
 
 impl Drop for Foo {
diff --git a/tests/ui/illegal-ufcs-drop.rs b/tests/ui/illegal-ufcs-drop.rs
index 11411f55494..29774306ec6 100644
--- a/tests/ui/illegal-ufcs-drop.rs
+++ b/tests/ui/illegal-ufcs-drop.rs
@@ -1,4 +1,7 @@
 // run-rustfix
+
+#![allow(drop_ref)]
+
 struct Foo;
 
 impl Drop for Foo {
diff --git a/tests/ui/illegal-ufcs-drop.stderr b/tests/ui/illegal-ufcs-drop.stderr
index 91f47d5e456..7a5c0612c07 100644
--- a/tests/ui/illegal-ufcs-drop.stderr
+++ b/tests/ui/illegal-ufcs-drop.stderr
@@ -1,5 +1,5 @@
 error[E0040]: explicit use of destructor method
-  --> $DIR/illegal-ufcs-drop.rs:9:5
+  --> $DIR/illegal-ufcs-drop.rs:12:5
    |
 LL |     Drop::drop(&mut Foo)
    |     ^^^^^^^^^^
diff --git a/tests/ui/liveness/liveness-unused.rs b/tests/ui/liveness/liveness-unused.rs
index 9c7be15fcc8..8ef6ab1b6ff 100644
--- a/tests/ui/liveness/liveness-unused.rs
+++ b/tests/ui/liveness/liveness-unused.rs
@@ -1,7 +1,7 @@
 #![warn(unused)]
 #![deny(unused_variables)]
 #![deny(unused_assignments)]
-#![allow(dead_code, non_camel_case_types, trivial_numeric_casts)]
+#![allow(dead_code, non_camel_case_types, trivial_numeric_casts, drop_copy)]
 
 use std::ops::AddAssign;
 
diff --git a/tests/ui/macros/parse-complex-macro-invoc-op.rs b/tests/ui/macros/parse-complex-macro-invoc-op.rs
index 8fef9b0ed87..c50dfdf0116 100644
--- a/tests/ui/macros/parse-complex-macro-invoc-op.rs
+++ b/tests/ui/macros/parse-complex-macro-invoc-op.rs
@@ -4,6 +4,7 @@
 #![allow(unused_assignments)]
 #![allow(unused_variables)]
 #![allow(stable_features)]
+#![allow(drop_copy)]
 
 // Test parsing binary operators after macro invocations.
 
diff --git a/tests/ui/never_type/never-assign-dead-code.rs b/tests/ui/never_type/never-assign-dead-code.rs
index 7bb7c87097c..e95a992d780 100644
--- a/tests/ui/never_type/never-assign-dead-code.rs
+++ b/tests/ui/never_type/never-assign-dead-code.rs
@@ -3,6 +3,7 @@
 // check-pass
 
 #![feature(never_type)]
+#![allow(drop_copy)]
 #![warn(unused)]
 
 fn main() {
diff --git a/tests/ui/never_type/never-assign-dead-code.stderr b/tests/ui/never_type/never-assign-dead-code.stderr
index 521b82023c9..5660bde5c27 100644
--- a/tests/ui/never_type/never-assign-dead-code.stderr
+++ b/tests/ui/never_type/never-assign-dead-code.stderr
@@ -1,5 +1,5 @@
 warning: unreachable statement
-  --> $DIR/never-assign-dead-code.rs:10:5
+  --> $DIR/never-assign-dead-code.rs:11:5
    |
 LL |     let x: ! = panic!("aah");
    |                ------------- any code following this expression is unreachable
@@ -7,14 +7,14 @@ LL |     drop(x);
    |     ^^^^^^^^ unreachable statement
    |
 note: the lint level is defined here
-  --> $DIR/never-assign-dead-code.rs:6:9
+  --> $DIR/never-assign-dead-code.rs:7:9
    |
 LL | #![warn(unused)]
    |         ^^^^^^
    = note: `#[warn(unreachable_code)]` implied by `#[warn(unused)]`
 
 warning: unreachable call
-  --> $DIR/never-assign-dead-code.rs:10:5
+  --> $DIR/never-assign-dead-code.rs:11:5
    |
 LL |     drop(x);
    |     ^^^^ - any code following this expression is unreachable
@@ -22,7 +22,7 @@ LL |     drop(x);
    |     unreachable call
 
 warning: unused variable: `x`
-  --> $DIR/never-assign-dead-code.rs:9:9
+  --> $DIR/never-assign-dead-code.rs:10:9
    |
 LL |     let x: ! = panic!("aah");
    |         ^ help: if this is intentional, prefix it with an underscore: `_x`
diff --git a/tests/ui/nll/relate_tys/hr-fn-aba-as-aaa.rs b/tests/ui/nll/relate_tys/hr-fn-aba-as-aaa.rs
index 7cc0acf45f2..73ceaeeb875 100644
--- a/tests/ui/nll/relate_tys/hr-fn-aba-as-aaa.rs
+++ b/tests/ui/nll/relate_tys/hr-fn-aba-as-aaa.rs
@@ -5,6 +5,8 @@
 // check-pass
 // compile-flags:-Zno-leak-check
 
+#![allow(drop_copy)]
+
 fn make_it() -> for<'a, 'b> fn(&'a u32, &'b u32) -> &'a u32 {
     panic!()
 }
diff --git a/tests/ui/nll/ty-outlives/projection-body.rs b/tests/ui/nll/ty-outlives/projection-body.rs
index b03a539ebdb..bff9058a507 100644
--- a/tests/ui/nll/ty-outlives/projection-body.rs
+++ b/tests/ui/nll/ty-outlives/projection-body.rs
@@ -3,6 +3,8 @@
 //
 // check-pass
 
+#![allow(drop_ref)]
+
 trait MyTrait<'a> {
     type Output;
 }
diff --git a/tests/ui/or-patterns/or-patterns-default-binding-modes.rs b/tests/ui/or-patterns/or-patterns-default-binding-modes.rs
index e56f9ffe23c..c138d99d303 100644
--- a/tests/ui/or-patterns/or-patterns-default-binding-modes.rs
+++ b/tests/ui/or-patterns/or-patterns-default-binding-modes.rs
@@ -3,6 +3,8 @@
 // check-pass
 
 #![allow(irrefutable_let_patterns)]
+#![allow(drop_copy)]
+#![allow(drop_ref)]
 
 fn main() {
     // A regression test for a mistake we made at one point:
diff --git a/tests/ui/pattern/bindings-after-at/borrowck-pat-at-and-box-pass.rs b/tests/ui/pattern/bindings-after-at/borrowck-pat-at-and-box-pass.rs
index fbdefd9d36c..965204bf240 100644
--- a/tests/ui/pattern/bindings-after-at/borrowck-pat-at-and-box-pass.rs
+++ b/tests/ui/pattern/bindings-after-at/borrowck-pat-at-and-box-pass.rs
@@ -2,6 +2,9 @@
 
 // Test `@` patterns combined with `box` patterns.
 
+#![allow(drop_ref)]
+#![allow(drop_copy)]
+
 #![feature(box_patterns)]
 
 #[derive(Copy, Clone)]
diff --git a/tests/ui/pattern/bindings-after-at/borrowck-pat-by-copy-bindings-in-at.rs b/tests/ui/pattern/bindings-after-at/borrowck-pat-by-copy-bindings-in-at.rs
index 0108861cfce..3eb5d2cbf54 100644
--- a/tests/ui/pattern/bindings-after-at/borrowck-pat-by-copy-bindings-in-at.rs
+++ b/tests/ui/pattern/bindings-after-at/borrowck-pat-by-copy-bindings-in-at.rs
@@ -2,6 +2,8 @@
 
 // Test `Copy` bindings in the rhs of `@` patterns.
 
+#![allow(drop_copy)]
+
 #[derive(Copy, Clone)]
 struct C;
 
diff --git a/tests/ui/pattern/move-ref-patterns/borrowck-move-ref-pattern-pass.rs b/tests/ui/pattern/move-ref-patterns/borrowck-move-ref-pattern-pass.rs
index 5445696fdff..0550238549e 100644
--- a/tests/ui/pattern/move-ref-patterns/borrowck-move-ref-pattern-pass.rs
+++ b/tests/ui/pattern/move-ref-patterns/borrowck-move-ref-pattern-pass.rs
@@ -1,5 +1,7 @@
 // check-pass
 
+#![allow(drop_ref)]
+
 fn main() {}
 
 struct U;
diff --git a/tests/ui/pattern/move-ref-patterns/move-ref-patterns-closure-captures-pass.rs b/tests/ui/pattern/move-ref-patterns/move-ref-patterns-closure-captures-pass.rs
index 583f70f41aa..788975d960a 100644
--- a/tests/ui/pattern/move-ref-patterns/move-ref-patterns-closure-captures-pass.rs
+++ b/tests/ui/pattern/move-ref-patterns/move-ref-patterns-closure-captures-pass.rs
@@ -1,5 +1,7 @@
 // check-pass
 
+#![allow(drop_ref)]
+
 fn main() {
     struct U;
     fn accept_fn_once(_: impl FnOnce()) {}
diff --git a/tests/ui/print_type_sizes/async.rs b/tests/ui/print_type_sizes/async.rs
index 1598b069691..c73268dc46a 100644
--- a/tests/ui/print_type_sizes/async.rs
+++ b/tests/ui/print_type_sizes/async.rs
@@ -3,6 +3,8 @@
 // build-pass
 // ignore-pass
 
+#![allow(drop_copy)]
+
 async fn wait() {}
 
 pub async fn test(arg: [u8; 8192]) {
diff --git a/tests/ui/print_type_sizes/async.stdout b/tests/ui/print_type_sizes/async.stdout
index 1c6887412be..873def9031a 100644
--- a/tests/ui/print_type_sizes/async.stdout
+++ b/tests/ui/print_type_sizes/async.stdout
@@ -1,4 +1,4 @@
-print-type-size type: `[async fn body@$DIR/async.rs:8:36: 11:2]`: 16386 bytes, alignment: 1 bytes
+print-type-size type: `[async fn body@$DIR/async.rs:10:36: 13:2]`: 16386 bytes, alignment: 1 bytes
 print-type-size     discriminant: 1 bytes
 print-type-size     variant `Unresumed`: 8192 bytes
 print-type-size         upvar `.arg`: 8192 bytes
@@ -16,14 +16,14 @@ print-type-size type: `std::mem::MaybeUninit<[u8; 8192]>`: 8192 bytes, alignment
 print-type-size     variant `MaybeUninit`: 8192 bytes
 print-type-size         field `.uninit`: 0 bytes
 print-type-size         field `.value`: 8192 bytes
-print-type-size type: `[async fn body@$DIR/async.rs:6:17: 6:19]`: 1 bytes, alignment: 1 bytes
+print-type-size type: `[async fn body@$DIR/async.rs:8:17: 8:19]`: 1 bytes, alignment: 1 bytes
 print-type-size     discriminant: 1 bytes
 print-type-size     variant `Unresumed`: 0 bytes
 print-type-size     variant `Returned`: 0 bytes
 print-type-size     variant `Panicked`: 0 bytes
-print-type-size type: `std::mem::ManuallyDrop<[async fn body@$DIR/async.rs:6:17: 6:19]>`: 1 bytes, alignment: 1 bytes
+print-type-size type: `std::mem::ManuallyDrop<[async fn body@$DIR/async.rs:8:17: 8:19]>`: 1 bytes, alignment: 1 bytes
 print-type-size     field `.value`: 1 bytes
-print-type-size type: `std::mem::MaybeUninit<[async fn body@$DIR/async.rs:6:17: 6:19]>`: 1 bytes, alignment: 1 bytes
+print-type-size type: `std::mem::MaybeUninit<[async fn body@$DIR/async.rs:8:17: 8:19]>`: 1 bytes, alignment: 1 bytes
 print-type-size     variant `MaybeUninit`: 1 bytes
 print-type-size         field `.uninit`: 0 bytes
 print-type-size         field `.value`: 1 bytes
diff --git a/tests/ui/print_type_sizes/generator_discr_placement.rs b/tests/ui/print_type_sizes/generator_discr_placement.rs
index 1a85fe95bb6..a77a03f0a8a 100644
--- a/tests/ui/print_type_sizes/generator_discr_placement.rs
+++ b/tests/ui/print_type_sizes/generator_discr_placement.rs
@@ -6,6 +6,7 @@
 
 // Avoid emitting panic handlers, like the rest of these tests...
 #![feature(generators)]
+#![allow(drop_copy)]
 
 pub fn foo() {
     let a = || {
diff --git a/tests/ui/print_type_sizes/generator_discr_placement.stdout b/tests/ui/print_type_sizes/generator_discr_placement.stdout
index f2a11c7a33b..fe0022cf5f4 100644
--- a/tests/ui/print_type_sizes/generator_discr_placement.stdout
+++ b/tests/ui/print_type_sizes/generator_discr_placement.stdout
@@ -1,4 +1,4 @@
-print-type-size type: `[generator@$DIR/generator_discr_placement.rs:11:13: 11:15]`: 8 bytes, alignment: 4 bytes
+print-type-size type: `[generator@$DIR/generator_discr_placement.rs:12:13: 12:15]`: 8 bytes, alignment: 4 bytes
 print-type-size     discriminant: 1 bytes
 print-type-size     variant `Unresumed`: 0 bytes
 print-type-size     variant `Suspend0`: 7 bytes
diff --git a/tests/ui/regions/type-param-outlives-reempty-issue-74429-2.rs b/tests/ui/regions/type-param-outlives-reempty-issue-74429-2.rs
index a65c17e0efc..5ae5ebb450e 100644
--- a/tests/ui/regions/type-param-outlives-reempty-issue-74429-2.rs
+++ b/tests/ui/regions/type-param-outlives-reempty-issue-74429-2.rs
@@ -55,11 +55,11 @@ where
 }
 
 pub fn x<T: Copy>(a: Array<T>) {
-    // drop just avoids a must_use warning
-    drop((0..1).filter(|_| true));
+    // _ just avoids a must_use warning
+    let _ = (0..1).filter(|_| true);
     let y = a.index_axis();
     a.axis_iter().for_each(|_| {
-        drop(y);
+        let _ = y;
     });
 }
 
diff --git a/tests/ui/regions/type-param-outlives-reempty-issue-74429.rs b/tests/ui/regions/type-param-outlives-reempty-issue-74429.rs
index d463f311c34..af2bb09805a 100644
--- a/tests/ui/regions/type-param-outlives-reempty-issue-74429.rs
+++ b/tests/ui/regions/type-param-outlives-reempty-issue-74429.rs
@@ -3,6 +3,8 @@
 
 // check-pass
 
+#![allow(drop_copy)]
+
 use std::marker::PhantomData;
 
 fn apply<T, F: FnOnce(T)>(_: T, _: F) {}
diff --git a/tests/ui/rfc-2008-non-exhaustive/borrowck-exhaustive.rs b/tests/ui/rfc-2008-non-exhaustive/borrowck-exhaustive.rs
index be775b37f7b..8f45b989f13 100644
--- a/tests/ui/rfc-2008-non-exhaustive/borrowck-exhaustive.rs
+++ b/tests/ui/rfc-2008-non-exhaustive/borrowck-exhaustive.rs
@@ -3,6 +3,8 @@
 
 // check-pass
 
+#![allow(drop_ref)]
+
 // aux-build:monovariants.rs
 extern crate monovariants;
 
diff --git a/tests/ui/rfc-2361-dbg-macro/dbg-macro-expected-behavior.rs b/tests/ui/rfc-2361-dbg-macro/dbg-macro-expected-behavior.rs
index 04d924a9aed..4c1562790d5 100644
--- a/tests/ui/rfc-2361-dbg-macro/dbg-macro-expected-behavior.rs
+++ b/tests/ui/rfc-2361-dbg-macro/dbg-macro-expected-behavior.rs
@@ -4,6 +4,8 @@
 // Tests ensuring that `dbg!(expr)` has the expected run-time behavior.
 // as well as some compile time properties we expect.
 
+#![allow(drop_copy)]
+
 #[derive(Copy, Clone, Debug)]
 struct Unit;
 
diff --git a/tests/ui/rfc-2361-dbg-macro/dbg-macro-expected-behavior.run.stderr b/tests/ui/rfc-2361-dbg-macro/dbg-macro-expected-behavior.run.stderr
index 49d72158e92..a20a6062c13 100644
--- a/tests/ui/rfc-2361-dbg-macro/dbg-macro-expected-behavior.run.stderr
+++ b/tests/ui/rfc-2361-dbg-macro/dbg-macro-expected-behavior.run.stderr
@@ -1,28 +1,28 @@
-[$DIR/dbg-macro-expected-behavior.rs:20] Unit = Unit
-[$DIR/dbg-macro-expected-behavior.rs:21] a = Unit
-[$DIR/dbg-macro-expected-behavior.rs:27] Point { x: 42, y: 24 } = Point {
+[$DIR/dbg-macro-expected-behavior.rs:22] Unit = Unit
+[$DIR/dbg-macro-expected-behavior.rs:23] a = Unit
+[$DIR/dbg-macro-expected-behavior.rs:29] Point { x: 42, y: 24 } = Point {
     x: 42,
     y: 24,
 }
-[$DIR/dbg-macro-expected-behavior.rs:28] b = Point {
+[$DIR/dbg-macro-expected-behavior.rs:30] b = Point {
     x: 42,
     y: 24,
 }
-[$DIR/dbg-macro-expected-behavior.rs:36]
-[$DIR/dbg-macro-expected-behavior.rs:40] &a = NoCopy(
+[$DIR/dbg-macro-expected-behavior.rs:38]
+[$DIR/dbg-macro-expected-behavior.rs:42] &a = NoCopy(
     1337,
 )
-[$DIR/dbg-macro-expected-behavior.rs:40] dbg!(& a) = NoCopy(
+[$DIR/dbg-macro-expected-behavior.rs:42] dbg!(& a) = NoCopy(
     1337,
 )
-[$DIR/dbg-macro-expected-behavior.rs:45] f(&42) = 42
+[$DIR/dbg-macro-expected-behavior.rs:47] f(&42) = 42
 before
-[$DIR/dbg-macro-expected-behavior.rs:50] { foo += 1; eprintln!("before"); 7331 } = 7331
-[$DIR/dbg-macro-expected-behavior.rs:58] ("Yeah",) = (
+[$DIR/dbg-macro-expected-behavior.rs:52] { foo += 1; eprintln!("before"); 7331 } = 7331
+[$DIR/dbg-macro-expected-behavior.rs:60] ("Yeah",) = (
     "Yeah",
 )
-[$DIR/dbg-macro-expected-behavior.rs:61] 1 = 1
-[$DIR/dbg-macro-expected-behavior.rs:61] 2 = 2
-[$DIR/dbg-macro-expected-behavior.rs:65] 1u8 = 1
-[$DIR/dbg-macro-expected-behavior.rs:65] 2u32 = 2
-[$DIR/dbg-macro-expected-behavior.rs:65] "Yeah" = "Yeah"
+[$DIR/dbg-macro-expected-behavior.rs:63] 1 = 1
+[$DIR/dbg-macro-expected-behavior.rs:63] 2 = 2
+[$DIR/dbg-macro-expected-behavior.rs:67] 1u8 = 1
+[$DIR/dbg-macro-expected-behavior.rs:67] 2u32 = 2
+[$DIR/dbg-macro-expected-behavior.rs:67] "Yeah" = "Yeah"
diff --git a/tests/ui/rust-2018/remove-extern-crate.fixed b/tests/ui/rust-2018/remove-extern-crate.fixed
index 15e0ccc5256..4ed4d610025 100644
--- a/tests/ui/rust-2018/remove-extern-crate.fixed
+++ b/tests/ui/rust-2018/remove-extern-crate.fixed
@@ -5,6 +5,7 @@
 // compile-flags:--extern remove_extern_crate
 
 #![warn(rust_2018_idioms)]
+#![allow(drop_copy)]
 
  //~ WARNING unused extern crate
 // Shouldn't suggest changing to `use`, as `another_name`
diff --git a/tests/ui/rust-2018/remove-extern-crate.rs b/tests/ui/rust-2018/remove-extern-crate.rs
index aec0bc7c374..5dafdb2b7b7 100644
--- a/tests/ui/rust-2018/remove-extern-crate.rs
+++ b/tests/ui/rust-2018/remove-extern-crate.rs
@@ -5,6 +5,7 @@
 // compile-flags:--extern remove_extern_crate
 
 #![warn(rust_2018_idioms)]
+#![allow(drop_copy)]
 
 extern crate core; //~ WARNING unused extern crate
 // Shouldn't suggest changing to `use`, as `another_name`
diff --git a/tests/ui/rust-2018/remove-extern-crate.stderr b/tests/ui/rust-2018/remove-extern-crate.stderr
index d07358e471b..f752cac8ed6 100644
--- a/tests/ui/rust-2018/remove-extern-crate.stderr
+++ b/tests/ui/rust-2018/remove-extern-crate.stderr
@@ -1,5 +1,5 @@
 warning: unused extern crate
-  --> $DIR/remove-extern-crate.rs:9:1
+  --> $DIR/remove-extern-crate.rs:10:1
    |
 LL | extern crate core;
    | ^^^^^^^^^^^^^^^^^^ help: remove it
@@ -12,7 +12,7 @@ LL | #![warn(rust_2018_idioms)]
    = note: `#[warn(unused_extern_crates)]` implied by `#[warn(rust_2018_idioms)]`
 
 warning: `extern crate` is not idiomatic in the new edition
-  --> $DIR/remove-extern-crate.rs:33:5
+  --> $DIR/remove-extern-crate.rs:34:5
    |
 LL |     extern crate core;
    |     ^^^^^^^^^^^^^^^^^^
@@ -23,7 +23,7 @@ LL |     use core;
    |     ~~~
 
 warning: `extern crate` is not idiomatic in the new edition
-  --> $DIR/remove-extern-crate.rs:43:5
+  --> $DIR/remove-extern-crate.rs:44:5
    |
 LL |     pub extern crate core;
    |     ^^^^^^^^^^^^^^^^^^^^^^
diff --git a/tests/ui/statics/issue-91050-1.rs b/tests/ui/statics/issue-91050-1.rs
index 403a41462ef..f59bcf0b803 100644
--- a/tests/ui/statics/issue-91050-1.rs
+++ b/tests/ui/statics/issue-91050-1.rs
@@ -12,6 +12,8 @@
 //
 // In regular builds, the bad cast was UB, like "Invalid LLVMRustVisibility value!"
 
+#![allow(drop_copy)]
+
 pub mod before {
     #[no_mangle]
     pub static GLOBAL1: [u8; 1] = [1];
diff --git a/tests/ui/traits/copy-guessing.rs b/tests/ui/traits/copy-guessing.rs
index f031dd9ca48..558303c2e40 100644
--- a/tests/ui/traits/copy-guessing.rs
+++ b/tests/ui/traits/copy-guessing.rs
@@ -1,5 +1,8 @@
 // run-pass
+
 #![allow(dead_code)]
+#![allow(drop_copy)]
+
 // "guessing" in trait selection can affect `copy_or_move`. Check that this
 // is correctly handled. I am not sure what is the "correct" behaviour,
 // but we should at least not ICE.
diff --git a/tests/ui/traits/impl-evaluation-order.rs b/tests/ui/traits/impl-evaluation-order.rs
index 57809d89aa6..256ce992eef 100644
--- a/tests/ui/traits/impl-evaluation-order.rs
+++ b/tests/ui/traits/impl-evaluation-order.rs
@@ -6,6 +6,8 @@
 
 // check-pass
 
+#![allow(drop_copy)]
+
 trait A {
     type B;
 }
diff --git a/tests/ui/traits/new-solver/auto-with-drop_tracking_mir.fail.stderr b/tests/ui/traits/new-solver/auto-with-drop_tracking_mir.fail.stderr
index 6a926534e07..4aefdd6bb07 100644
--- a/tests/ui/traits/new-solver/auto-with-drop_tracking_mir.fail.stderr
+++ b/tests/ui/traits/new-solver/auto-with-drop_tracking_mir.fail.stderr
@@ -1,5 +1,5 @@
 error[E0277]: `impl Future<Output = ()>` cannot be sent between threads safely
-  --> $DIR/auto-with-drop_tracking_mir.rs:24:13
+  --> $DIR/auto-with-drop_tracking_mir.rs:25:13
    |
 LL |     is_send(foo());
    |     ------- ^^^^^ `impl Future<Output = ()>` cannot be sent between threads safely
@@ -8,7 +8,7 @@ LL |     is_send(foo());
    |
    = help: the trait `Send` is not implemented for `impl Future<Output = ()>`
 note: required by a bound in `is_send`
-  --> $DIR/auto-with-drop_tracking_mir.rs:23:24
+  --> $DIR/auto-with-drop_tracking_mir.rs:24:24
    |
 LL |     fn is_send(_: impl Send) {}
    |                        ^^^^ required by this bound in `is_send`
diff --git a/tests/ui/traits/new-solver/auto-with-drop_tracking_mir.rs b/tests/ui/traits/new-solver/auto-with-drop_tracking_mir.rs
index a5db7c4636b..f115e143318 100644
--- a/tests/ui/traits/new-solver/auto-with-drop_tracking_mir.rs
+++ b/tests/ui/traits/new-solver/auto-with-drop_tracking_mir.rs
@@ -14,6 +14,7 @@ async fn foo() {
     #[cfg(fail)]
     let x = &NotSync;
     bar().await;
+    #[allow(drop_ref)]
     drop(x);
 }
 
diff --git a/tests/ui/traits/new-solver/temporary-ambiguity.rs b/tests/ui/traits/new-solver/temporary-ambiguity.rs
index 18ee0545700..c6c11a1a1de 100644
--- a/tests/ui/traits/new-solver/temporary-ambiguity.rs
+++ b/tests/ui/traits/new-solver/temporary-ambiguity.rs
@@ -18,5 +18,5 @@ fn main() {
     let w = Wrapper(x);
     needs_foo(w);
     x = 1;
-    drop(x);
+    let _ = x;
 }
diff --git a/tests/ui/trivial-bounds/trivial-bounds-inconsistent-copy.rs b/tests/ui/trivial-bounds/trivial-bounds-inconsistent-copy.rs
index 3416503b851..6ed7667115a 100644
--- a/tests/ui/trivial-bounds/trivial-bounds-inconsistent-copy.rs
+++ b/tests/ui/trivial-bounds/trivial-bounds-inconsistent-copy.rs
@@ -1,6 +1,8 @@
 // check-pass
 // Check tautalogically false `Copy` bounds
+
 #![feature(trivial_bounds)]
+#![allow(drop_ref, drop_copy)]
 
 fn copy_string(t: String) -> String where String: Copy { //~ WARNING trivial_bounds
     is_copy(&t);
diff --git a/tests/ui/trivial-bounds/trivial-bounds-inconsistent-copy.stderr b/tests/ui/trivial-bounds/trivial-bounds-inconsistent-copy.stderr
index 1e26623899b..deeb352a2a8 100644
--- a/tests/ui/trivial-bounds/trivial-bounds-inconsistent-copy.stderr
+++ b/tests/ui/trivial-bounds/trivial-bounds-inconsistent-copy.stderr
@@ -1,5 +1,5 @@
 warning: trait bound String: Copy does not depend on any type or lifetime parameters
-  --> $DIR/trivial-bounds-inconsistent-copy.rs:5:51
+  --> $DIR/trivial-bounds-inconsistent-copy.rs:7:51
    |
 LL | fn copy_string(t: String) -> String where String: Copy {
    |                                                   ^^^^
@@ -7,19 +7,19 @@ LL | fn copy_string(t: String) -> String where String: Copy {
    = note: `#[warn(trivial_bounds)]` on by default
 
 warning: trait bound String: Copy does not depend on any type or lifetime parameters
-  --> $DIR/trivial-bounds-inconsistent-copy.rs:12:56
+  --> $DIR/trivial-bounds-inconsistent-copy.rs:14:56
    |
 LL | fn copy_out_string(t: &String) -> String where String: Copy {
    |                                                        ^^^^
 
 warning: trait bound String: Copy does not depend on any type or lifetime parameters
-  --> $DIR/trivial-bounds-inconsistent-copy.rs:16:55
+  --> $DIR/trivial-bounds-inconsistent-copy.rs:18:55
    |
 LL | fn copy_string_with_param<T>(x: String) where String: Copy {
    |                                                       ^^^^
 
 warning: trait bound for<'b> &'b mut i32: Copy does not depend on any type or lifetime parameters
-  --> $DIR/trivial-bounds-inconsistent-copy.rs:22:76
+  --> $DIR/trivial-bounds-inconsistent-copy.rs:24:76
    |
 LL | fn copy_mut<'a>(t: &&'a mut i32) -> &'a mut i32 where for<'b> &'b mut i32: Copy {
    |                                                                            ^^^^