diff options
| author | Dylan DPC <99973273+Dylan-DPC@users.noreply.github.com> | 2023-05-23 00:32:19 +0530 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-05-23 00:32:19 +0530 |
| commit | 71f78682be1c097e7a43d20ab84c81b08f8b6305 (patch) | |
| tree | e9e85345558bf9b44497d929ccb195f9d6aceeb8 /tests | |
| parent | df8b0dfc277e302882d5052e20b7eb7b725d2bdf (diff) | |
| parent | 6b08a745a4d59e9bf51d2d591c569c9e758bd02a (diff) | |
| download | rust-71f78682be1c097e7a43d20ab84c81b08f8b6305.tar.gz rust-71f78682be1c097e7a43d20ab84c81b08f8b6305.zip | |
Rollup merge of #111756 - Urgau:rename_drop_forget_copy_ref_lints, r=fee1-dead
Rename `{drop,forget}_{copy,ref}` lints to more consistent naming
This PR renames previous uplifted lints in https://github.com/rust-lang/rust/pull/109732 to more consistent naming.
I followed the renaming done [here](https://github.com/rust-lang/rust/issues/53224) and also advocated in this [clippy issue](https://github.com/rust-lang/rust-clippy/issues/2845):
- `drop_copy` to `dropping_copy_types`
- `forget_copy` to `forgetting_copy_types`
- `drop_ref` to `dropping_references`
- `forget_ref` to `forgetting_references`
Diffstat (limited to 'tests')
50 files changed, 101 insertions, 101 deletions
diff --git a/tests/ui/associated-inherent-types/inference.rs b/tests/ui/associated-inherent-types/inference.rs index 7d6d26003f6..ebd8e1d5594 100644 --- a/tests/ui/associated-inherent-types/inference.rs +++ b/tests/ui/associated-inherent-types/inference.rs @@ -3,7 +3,7 @@ #![feature(inherent_associated_types)] #![allow(incomplete_features)] -#![allow(drop_copy)] +#![allow(dropping_copy_types)] use std::convert::identity; diff --git a/tests/ui/borrowck/borrowck-closures-slice-patterns-ok.rs b/tests/ui/borrowck/borrowck-closures-slice-patterns-ok.rs index 9163c8ed6fb..60128c9419d 100644 --- a/tests/ui/borrowck/borrowck-closures-slice-patterns-ok.rs +++ b/tests/ui/borrowck/borrowck-closures-slice-patterns-ok.rs @@ -1,7 +1,7 @@ // Check that closure captures for slice patterns are inferred correctly #![allow(unused_variables)] -#![allow(drop_ref)] +#![allow(dropping_references)] // run-pass diff --git a/tests/ui/borrowck/borrowck-field-sensitivity-rpass.rs b/tests/ui/borrowck/borrowck-field-sensitivity-rpass.rs index a88b323e0bf..78e965cc4bc 100644 --- a/tests/ui/borrowck/borrowck-field-sensitivity-rpass.rs +++ b/tests/ui/borrowck/borrowck-field-sensitivity-rpass.rs @@ -1,7 +1,7 @@ // run-pass #![allow(unused_mut)] #![allow(unused_variables)] -#![allow(drop_copy)] +#![allow(dropping_copy_types)] // 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 40c6bfeeb43..9acb1ec5e43 100644 --- a/tests/ui/borrowck/borrowck-use-mut-borrow-rpass.rs +++ b/tests/ui/borrowck/borrowck-use-mut-borrow-rpass.rs @@ -1,7 +1,7 @@ // run-pass // pretty-expanded FIXME #23616 -#![allow(drop_copy)] +#![allow(dropping_copy_types)] struct A { a: isize, b: Box<isize> } 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 bc7295a0826..98f8d5d4733 100644 --- a/tests/ui/closures/2229_closure_analysis/migrations/issue-78720.rs +++ b/tests/ui/closures/2229_closure_analysis/migrations/issue-78720.rs @@ -1,7 +1,7 @@ // run-pass #![warn(rust_2021_incompatible_closure_captures)] -#![allow(drop_ref, drop_copy)] +#![allow(dropping_references, dropping_copy_types)] fn main() { 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 0f15f664e75..5496d0e5fc7 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,7 +3,7 @@ #![allow(unused)] #![allow(dead_code)] -#![allow(drop_ref)] +#![allow(dropping_references)] 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 a097424a021..b5e97ec1c1b 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 @@ -2,7 +2,7 @@ // check-pass #![feature(rustc_attrs)] -#![allow(drop_ref)] +#![allow(dropping_references)] fn main() { let mut x = 1; diff --git a/tests/ui/consts/const_forget.rs b/tests/ui/consts/const_forget.rs index acdd6a54cf4..f06149f2cb9 100644 --- a/tests/ui/consts/const_forget.rs +++ b/tests/ui/consts/const_forget.rs @@ -1,6 +1,6 @@ // check-pass -#![allow(forget_copy)] +#![allow(forgetting_copy_types)] use std::mem::forget; diff --git a/tests/ui/consts/issue-104155.rs b/tests/ui/consts/issue-104155.rs index b3821f467b6..7b375dc0566 100644 --- a/tests/ui/consts/issue-104155.rs +++ b/tests/ui/consts/issue-104155.rs @@ -1,6 +1,6 @@ // check-pass -#![allow(forget_copy)] +#![allow(forgetting_copy_types)] 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 8d1d0b4fcdf..fce97d9ba23 100644 --- a/tests/ui/crate-leading-sep.rs +++ b/tests/ui/crate-leading-sep.rs @@ -1,7 +1,7 @@ // run-pass // pretty-expanded FIXME #23616 -#![allow(drop_copy)] +#![allow(dropping_copy_types)] fn main() { use ::std::mem; diff --git a/tests/ui/drop/repeat-drop.rs b/tests/ui/drop/repeat-drop.rs index 659d35db657..0afb4bb11bc 100644 --- a/tests/ui/drop/repeat-drop.rs +++ b/tests/ui/drop/repeat-drop.rs @@ -1,7 +1,7 @@ // run-pass // needs-unwind -#![allow(drop_ref, drop_copy)] +#![allow(dropping_references, dropping_copy_types)] static mut CHECK: usize = 0; diff --git a/tests/ui/explicit/explicit-call-to-supertrait-dtor.fixed b/tests/ui/explicit/explicit-call-to-supertrait-dtor.fixed index 0bc4feed329..bb093a4af4a 100644 --- a/tests/ui/explicit/explicit-call-to-supertrait-dtor.fixed +++ b/tests/ui/explicit/explicit-call-to-supertrait-dtor.fixed @@ -1,6 +1,6 @@ // run-rustfix -#![allow(drop_ref)] +#![allow(dropping_references)] 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 26ae6698d66..1a9f89c054f 100644 --- a/tests/ui/explicit/explicit-call-to-supertrait-dtor.rs +++ b/tests/ui/explicit/explicit-call-to-supertrait-dtor.rs @@ -1,6 +1,6 @@ // run-rustfix -#![allow(drop_ref)] +#![allow(dropping_references)] struct Foo { x: isize diff --git a/tests/ui/generator/drop-env.rs b/tests/ui/generator/drop-env.rs index cb46953dac3..137a407931a 100644 --- a/tests/ui/generator/drop-env.rs +++ b/tests/ui/generator/drop-env.rs @@ -4,7 +4,7 @@ //[nomiropt]compile-flags: -Z mir-opt-level=0 #![feature(generators, generator_trait)] -#![allow(drop_copy)] +#![allow(dropping_copy_types)] use std::ops::Generator; use std::pin::Pin; diff --git a/tests/ui/generator/issue-57017.rs b/tests/ui/generator/issue-57017.rs index 918d233bf4e..381897c77a5 100644 --- a/tests/ui/generator/issue-57017.rs +++ b/tests/ui/generator/issue-57017.rs @@ -5,7 +5,7 @@ // [drop_tracking_mir] build-pass #![feature(generators, negative_impls)] -#![allow(drop_ref, drop_copy)] +#![allow(dropping_references, dropping_copy_types)] 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 adba800e25a..a5dde3912cc 100644 --- a/tests/ui/generator/non-static-is-unpin.rs +++ b/tests/ui/generator/non-static-is-unpin.rs @@ -3,7 +3,7 @@ // run-pass #![feature(generators, generator_trait)] -#![allow(drop_copy)] +#![allow(dropping_copy_types)] use std::marker::{PhantomPinned, Unpin}; diff --git a/tests/ui/generator/resume-arg-size.rs b/tests/ui/generator/resume-arg-size.rs index 19618f8d0aa..195166f975b 100644 --- a/tests/ui/generator/resume-arg-size.rs +++ b/tests/ui/generator/resume-arg-size.rs @@ -1,5 +1,5 @@ #![feature(generators)] -#![allow(drop_copy)] +#![allow(dropping_copy_types)] // 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 214267372bf..721bb7281c0 100644 --- a/tests/ui/hygiene/stdlib-prelude-from-opaque-late.rs +++ b/tests/ui/hygiene/stdlib-prelude-from-opaque-late.rs @@ -1,7 +1,7 @@ // check-pass #![feature(decl_macro)] -#![allow(drop_copy)] +#![allow(dropping_copy_types)] macro mac() { mod m { diff --git a/tests/ui/illegal-ufcs-drop.fixed b/tests/ui/illegal-ufcs-drop.fixed index 8783682dec4..c088c82791b 100644 --- a/tests/ui/illegal-ufcs-drop.fixed +++ b/tests/ui/illegal-ufcs-drop.fixed @@ -1,6 +1,6 @@ // run-rustfix -#![allow(drop_ref)] +#![allow(dropping_references)] struct Foo; diff --git a/tests/ui/illegal-ufcs-drop.rs b/tests/ui/illegal-ufcs-drop.rs index 29774306ec6..1389b112188 100644 --- a/tests/ui/illegal-ufcs-drop.rs +++ b/tests/ui/illegal-ufcs-drop.rs @@ -1,6 +1,6 @@ // run-rustfix -#![allow(drop_ref)] +#![allow(dropping_references)] struct Foo; diff --git a/tests/ui/lint/drop_copy.rs b/tests/ui/lint/dropping_copy_types.rs index 0adcd34505f..2937320e5d8 100644 --- a/tests/ui/lint/drop_copy.rs +++ b/tests/ui/lint/dropping_copy_types.rs @@ -1,6 +1,6 @@ // check-pass -#![warn(drop_copy)] +#![warn(dropping_copy_types)] use std::mem::drop; use std::vec::Vec; diff --git a/tests/ui/lint/drop_copy.stderr b/tests/ui/lint/dropping_copy_types.stderr index db8e89ad295..b6291aa5ed6 100644 --- a/tests/ui/lint/drop_copy.stderr +++ b/tests/ui/lint/dropping_copy_types.stderr @@ -1,5 +1,5 @@ warning: calls to `std::mem::drop` with a value that implements `Copy` does nothing - --> $DIR/drop_copy.rs:34:5 + --> $DIR/dropping_copy_types.rs:34:5 | LL | drop(s1); | ^^^^^--^ @@ -8,13 +8,13 @@ LL | drop(s1); | = note: use `let _ = ...` to ignore the expression or result note: the lint level is defined here - --> $DIR/drop_copy.rs:3:9 + --> $DIR/dropping_copy_types.rs:3:9 | -LL | #![warn(drop_copy)] - | ^^^^^^^^^ +LL | #![warn(dropping_copy_types)] + | ^^^^^^^^^^^^^^^^^^^ warning: calls to `std::mem::drop` with a value that implements `Copy` does nothing - --> $DIR/drop_copy.rs:35:5 + --> $DIR/dropping_copy_types.rs:35:5 | LL | drop(s2); | ^^^^^--^ @@ -24,7 +24,7 @@ LL | drop(s2); = note: use `let _ = ...` to ignore the expression or result warning: calls to `std::mem::drop` with a reference instead of an owned value does nothing - --> $DIR/drop_copy.rs:36:5 + --> $DIR/dropping_copy_types.rs:36:5 | LL | drop(s3); | ^^^^^--^ @@ -32,10 +32,10 @@ LL | drop(s3); | argument has type `&SomeStruct` | = note: use `let _ = ...` to ignore the expression or result - = note: `#[warn(drop_ref)]` on by default + = note: `#[warn(dropping_references)]` on by default warning: calls to `std::mem::drop` with a value that implements `Copy` does nothing - --> $DIR/drop_copy.rs:37:5 + --> $DIR/dropping_copy_types.rs:37:5 | LL | drop(s4); | ^^^^^--^ @@ -45,7 +45,7 @@ LL | drop(s4); = note: use `let _ = ...` to ignore the expression or result warning: calls to `std::mem::drop` with a reference instead of an owned value does nothing - --> $DIR/drop_copy.rs:38:5 + --> $DIR/dropping_copy_types.rs:38:5 | LL | drop(s5); | ^^^^^--^ @@ -55,7 +55,7 @@ LL | drop(s5); = note: use `let _ = ...` to ignore the expression or result warning: calls to `std::mem::drop` with a reference instead of an owned value does nothing - --> $DIR/drop_copy.rs:50:5 + --> $DIR/dropping_copy_types.rs:50:5 | LL | drop(a2); | ^^^^^--^ @@ -65,7 +65,7 @@ LL | drop(a2); = note: use `let _ = ...` to ignore the expression or result warning: calls to `std::mem::drop` with a reference instead of an owned value does nothing - --> $DIR/drop_copy.rs:52:5 + --> $DIR/dropping_copy_types.rs:52:5 | LL | drop(a4); | ^^^^^--^ @@ -75,7 +75,7 @@ LL | drop(a4); = note: use `let _ = ...` to ignore the expression or result warning: calls to `std::mem::drop` with a value that implements `Copy` does nothing - --> $DIR/drop_copy.rs:71:13 + --> $DIR/dropping_copy_types.rs:71:13 | LL | drop(println_and(13)); | ^^^^^---------------^ @@ -85,7 +85,7 @@ LL | drop(println_and(13)); = note: use `let _ = ...` to ignore the expression or result warning: calls to `std::mem::drop` with a value that implements `Copy` does nothing - --> $DIR/drop_copy.rs:74:14 + --> $DIR/dropping_copy_types.rs:74:14 | LL | 3 if drop(println_and(14)) == () => (), | ^^^^^---------------^ @@ -95,7 +95,7 @@ LL | 3 if drop(println_and(14)) == () => (), = note: use `let _ = ...` to ignore the expression or result warning: calls to `std::mem::drop` with a value that implements `Copy` does nothing - --> $DIR/drop_copy.rs:76:14 + --> $DIR/dropping_copy_types.rs:76:14 | LL | 4 => drop(2), | ^^^^^-^ diff --git a/tests/ui/lint/drop_ref.rs b/tests/ui/lint/dropping_references.rs index db4f7569f6f..0d5d484f451 100644 --- a/tests/ui/lint/drop_ref.rs +++ b/tests/ui/lint/dropping_references.rs @@ -1,6 +1,6 @@ // check-pass -#![warn(drop_ref)] +#![warn(dropping_references)] struct SomeStruct; diff --git a/tests/ui/lint/drop_ref.stderr b/tests/ui/lint/dropping_references.stderr index 04c988fe99d..7e25a46216e 100644 --- a/tests/ui/lint/drop_ref.stderr +++ b/tests/ui/lint/dropping_references.stderr @@ -1,5 +1,5 @@ warning: calls to `std::mem::drop` with a reference instead of an owned value does nothing - --> $DIR/drop_ref.rs:8:5 + --> $DIR/dropping_references.rs:8:5 | LL | drop(&SomeStruct); | ^^^^^-----------^ @@ -8,13 +8,13 @@ LL | drop(&SomeStruct); | = note: use `let _ = ...` to ignore the expression or result note: the lint level is defined here - --> $DIR/drop_ref.rs:3:9 + --> $DIR/dropping_references.rs:3:9 | -LL | #![warn(drop_ref)] - | ^^^^^^^^ +LL | #![warn(dropping_references)] + | ^^^^^^^^^^^^^^^^^^^ warning: calls to `std::mem::drop` with a reference instead of an owned value does nothing - --> $DIR/drop_ref.rs:11:5 + --> $DIR/dropping_references.rs:11:5 | LL | drop(&owned1); | ^^^^^-------^ @@ -24,7 +24,7 @@ LL | drop(&owned1); = note: use `let _ = ...` to ignore the expression or result warning: calls to `std::mem::drop` with a reference instead of an owned value does nothing - --> $DIR/drop_ref.rs:12:5 + --> $DIR/dropping_references.rs:12:5 | LL | drop(&&owned1); | ^^^^^--------^ @@ -34,7 +34,7 @@ LL | drop(&&owned1); = note: use `let _ = ...` to ignore the expression or result warning: calls to `std::mem::drop` with a reference instead of an owned value does nothing - --> $DIR/drop_ref.rs:13:5 + --> $DIR/dropping_references.rs:13:5 | LL | drop(&mut owned1); | ^^^^^-----------^ @@ -44,7 +44,7 @@ LL | drop(&mut owned1); = note: use `let _ = ...` to ignore the expression or result warning: calls to `std::mem::drop` with a reference instead of an owned value does nothing - --> $DIR/drop_ref.rs:17:5 + --> $DIR/dropping_references.rs:17:5 | LL | drop(reference1); | ^^^^^----------^ @@ -54,7 +54,7 @@ LL | drop(reference1); = note: use `let _ = ...` to ignore the expression or result warning: calls to `std::mem::drop` with a reference instead of an owned value does nothing - --> $DIR/drop_ref.rs:20:5 + --> $DIR/dropping_references.rs:20:5 | LL | drop(reference2); | ^^^^^----------^ @@ -64,7 +64,7 @@ LL | drop(reference2); = note: use `let _ = ...` to ignore the expression or result warning: calls to `std::mem::drop` with a reference instead of an owned value does nothing - --> $DIR/drop_ref.rs:23:5 + --> $DIR/dropping_references.rs:23:5 | LL | drop(reference3); | ^^^^^----------^ @@ -74,7 +74,7 @@ LL | drop(reference3); = note: use `let _ = ...` to ignore the expression or result warning: calls to `std::mem::drop` with a reference instead of an owned value does nothing - --> $DIR/drop_ref.rs:28:5 + --> $DIR/dropping_references.rs:28:5 | LL | drop(&val); | ^^^^^----^ @@ -84,7 +84,7 @@ LL | drop(&val); = note: use `let _ = ...` to ignore the expression or result warning: calls to `std::mem::drop` with a reference instead of an owned value does nothing - --> $DIR/drop_ref.rs:36:5 + --> $DIR/dropping_references.rs:36:5 | LL | std::mem::drop(&SomeStruct); | ^^^^^^^^^^^^^^^-----------^ @@ -94,7 +94,7 @@ LL | std::mem::drop(&SomeStruct); = note: use `let _ = ...` to ignore the expression or result warning: calls to `std::mem::drop` with a reference instead of an owned value does nothing - --> $DIR/drop_ref.rs:91:13 + --> $DIR/dropping_references.rs:91:13 | LL | drop(println_and(&13)); | ^^^^^----------------^ @@ -104,7 +104,7 @@ LL | drop(println_and(&13)); = note: use `let _ = ...` to ignore the expression or result warning: calls to `std::mem::drop` with a reference instead of an owned value does nothing - --> $DIR/drop_ref.rs:94:14 + --> $DIR/dropping_references.rs:94:14 | LL | 3 if drop(println_and(&14)) == () => (), | ^^^^^----------------^ @@ -114,7 +114,7 @@ LL | 3 if drop(println_and(&14)) == () => (), = note: use `let _ = ...` to ignore the expression or result warning: calls to `std::mem::drop` with a reference instead of an owned value does nothing - --> $DIR/drop_ref.rs:96:14 + --> $DIR/dropping_references.rs:96:14 | LL | 4 => drop(&2), | ^^^^^--^ diff --git a/tests/ui/lint/forget_copy.rs b/tests/ui/lint/forgetting_copy_types.rs index a6b17b76971..224c7bcd5f6 100644 --- a/tests/ui/lint/forget_copy.rs +++ b/tests/ui/lint/forgetting_copy_types.rs @@ -1,6 +1,6 @@ // check-pass -#![warn(forget_copy)] +#![warn(forgetting_copy_types)] use std::mem::forget; use std::vec::Vec; diff --git a/tests/ui/lint/forget_copy.stderr b/tests/ui/lint/forgetting_copy_types.stderr index 37bc8a8854e..36d1ef5c53e 100644 --- a/tests/ui/lint/forget_copy.stderr +++ b/tests/ui/lint/forgetting_copy_types.stderr @@ -1,5 +1,5 @@ warning: calls to `std::mem::forget` with a value that implements `Copy` does nothing - --> $DIR/forget_copy.rs:34:5 + --> $DIR/forgetting_copy_types.rs:34:5 | LL | forget(s1); | ^^^^^^^--^ @@ -8,13 +8,13 @@ LL | forget(s1); | = note: use `let _ = ...` to ignore the expression or result note: the lint level is defined here - --> $DIR/forget_copy.rs:3:9 + --> $DIR/forgetting_copy_types.rs:3:9 | -LL | #![warn(forget_copy)] - | ^^^^^^^^^^^ +LL | #![warn(forgetting_copy_types)] + | ^^^^^^^^^^^^^^^^^^^^^ warning: calls to `std::mem::forget` with a value that implements `Copy` does nothing - --> $DIR/forget_copy.rs:35:5 + --> $DIR/forgetting_copy_types.rs:35:5 | LL | forget(s2); | ^^^^^^^--^ @@ -24,7 +24,7 @@ LL | forget(s2); = note: use `let _ = ...` to ignore the expression or result warning: calls to `std::mem::forget` with a reference instead of an owned value does nothing - --> $DIR/forget_copy.rs:36:5 + --> $DIR/forgetting_copy_types.rs:36:5 | LL | forget(s3); | ^^^^^^^--^ @@ -32,10 +32,10 @@ LL | forget(s3); | argument has type `&SomeStruct` | = note: use `let _ = ...` to ignore the expression or result - = note: `#[warn(forget_ref)]` on by default + = note: `#[warn(forgetting_references)]` on by default warning: calls to `std::mem::forget` with a value that implements `Copy` does nothing - --> $DIR/forget_copy.rs:37:5 + --> $DIR/forgetting_copy_types.rs:37:5 | LL | forget(s4); | ^^^^^^^--^ @@ -45,7 +45,7 @@ LL | forget(s4); = note: use `let _ = ...` to ignore the expression or result warning: calls to `std::mem::forget` with a reference instead of an owned value does nothing - --> $DIR/forget_copy.rs:38:5 + --> $DIR/forgetting_copy_types.rs:38:5 | LL | forget(s5); | ^^^^^^^--^ @@ -55,7 +55,7 @@ LL | forget(s5); = note: use `let _ = ...` to ignore the expression or result warning: calls to `std::mem::forget` with a reference instead of an owned value does nothing - --> $DIR/forget_copy.rs:50:5 + --> $DIR/forgetting_copy_types.rs:50:5 | LL | forget(a2); | ^^^^^^^--^ @@ -65,7 +65,7 @@ LL | forget(a2); = note: use `let _ = ...` to ignore the expression or result warning: calls to `std::mem::forget` with a reference instead of an owned value does nothing - --> $DIR/forget_copy.rs:52:5 + --> $DIR/forgetting_copy_types.rs:52:5 | LL | forget(a3); | ^^^^^^^--^ @@ -75,7 +75,7 @@ LL | forget(a3); = note: use `let _ = ...` to ignore the expression or result warning: calls to `std::mem::forget` with a reference instead of an owned value does nothing - --> $DIR/forget_copy.rs:53:5 + --> $DIR/forgetting_copy_types.rs:53:5 | LL | forget(a4); | ^^^^^^^--^ diff --git a/tests/ui/lint/forget_ref.rs b/tests/ui/lint/forgetting_references.rs index 13f6d4be3d1..bd51e980031 100644 --- a/tests/ui/lint/forget_ref.rs +++ b/tests/ui/lint/forgetting_references.rs @@ -1,6 +1,6 @@ // check-pass -#![warn(forget_ref)] +#![warn(forgetting_references)] use std::mem::forget; diff --git a/tests/ui/lint/forget_ref.stderr b/tests/ui/lint/forgetting_references.stderr index 63fc7791980..5624b690789 100644 --- a/tests/ui/lint/forget_ref.stderr +++ b/tests/ui/lint/forgetting_references.stderr @@ -1,5 +1,5 @@ warning: calls to `std::mem::forget` with a reference instead of an owned value does nothing - --> $DIR/forget_ref.rs:10:5 + --> $DIR/forgetting_references.rs:10:5 | LL | forget(&SomeStruct); | ^^^^^^^-----------^ @@ -8,13 +8,13 @@ LL | forget(&SomeStruct); | = note: use `let _ = ...` to ignore the expression or result note: the lint level is defined here - --> $DIR/forget_ref.rs:3:9 + --> $DIR/forgetting_references.rs:3:9 | -LL | #![warn(forget_ref)] - | ^^^^^^^^^^ +LL | #![warn(forgetting_references)] + | ^^^^^^^^^^^^^^^^^^^^^ warning: calls to `std::mem::forget` with a reference instead of an owned value does nothing - --> $DIR/forget_ref.rs:13:5 + --> $DIR/forgetting_references.rs:13:5 | LL | forget(&owned); | ^^^^^^^------^ @@ -24,7 +24,7 @@ LL | forget(&owned); = note: use `let _ = ...` to ignore the expression or result warning: calls to `std::mem::forget` with a reference instead of an owned value does nothing - --> $DIR/forget_ref.rs:14:5 + --> $DIR/forgetting_references.rs:14:5 | LL | forget(&&owned); | ^^^^^^^-------^ @@ -34,7 +34,7 @@ LL | forget(&&owned); = note: use `let _ = ...` to ignore the expression or result warning: calls to `std::mem::forget` with a reference instead of an owned value does nothing - --> $DIR/forget_ref.rs:15:5 + --> $DIR/forgetting_references.rs:15:5 | LL | forget(&mut owned); | ^^^^^^^----------^ @@ -44,7 +44,7 @@ LL | forget(&mut owned); = note: use `let _ = ...` to ignore the expression or result warning: calls to `std::mem::forget` with a reference instead of an owned value does nothing - --> $DIR/forget_ref.rs:19:5 + --> $DIR/forgetting_references.rs:19:5 | LL | forget(&*reference1); | ^^^^^^^------------^ @@ -54,7 +54,7 @@ LL | forget(&*reference1); = note: use `let _ = ...` to ignore the expression or result warning: calls to `std::mem::forget` with a reference instead of an owned value does nothing - --> $DIR/forget_ref.rs:22:5 + --> $DIR/forgetting_references.rs:22:5 | LL | forget(reference2); | ^^^^^^^----------^ @@ -64,7 +64,7 @@ LL | forget(reference2); = note: use `let _ = ...` to ignore the expression or result warning: calls to `std::mem::forget` with a reference instead of an owned value does nothing - --> $DIR/forget_ref.rs:25:5 + --> $DIR/forgetting_references.rs:25:5 | LL | forget(reference3); | ^^^^^^^----------^ @@ -74,7 +74,7 @@ LL | forget(reference3); = note: use `let _ = ...` to ignore the expression or result warning: calls to `std::mem::forget` with a reference instead of an owned value does nothing - --> $DIR/forget_ref.rs:30:5 + --> $DIR/forgetting_references.rs:30:5 | LL | forget(&val); | ^^^^^^^----^ @@ -84,7 +84,7 @@ LL | forget(&val); = note: use `let _ = ...` to ignore the expression or result warning: calls to `std::mem::forget` with a reference instead of an owned value does nothing - --> $DIR/forget_ref.rs:38:5 + --> $DIR/forgetting_references.rs:38:5 | LL | std::mem::forget(&SomeStruct); | ^^^^^^^^^^^^^^^^^-----------^ diff --git a/tests/ui/liveness/liveness-unused.rs b/tests/ui/liveness/liveness-unused.rs index 8ef6ab1b6ff..ba635e6638c 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, drop_copy)] +#![allow(dead_code, non_camel_case_types, trivial_numeric_casts, dropping_copy_types)] 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 c50dfdf0116..10810388d20 100644 --- a/tests/ui/macros/parse-complex-macro-invoc-op.rs +++ b/tests/ui/macros/parse-complex-macro-invoc-op.rs @@ -4,7 +4,7 @@ #![allow(unused_assignments)] #![allow(unused_variables)] #![allow(stable_features)] -#![allow(drop_copy)] +#![allow(dropping_copy_types)] // 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 e95a992d780..39df7de5a7f 100644 --- a/tests/ui/never_type/never-assign-dead-code.rs +++ b/tests/ui/never_type/never-assign-dead-code.rs @@ -3,7 +3,7 @@ // check-pass #![feature(never_type)] -#![allow(drop_copy)] +#![allow(dropping_copy_types)] #![warn(unused)] fn main() { 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 73ceaeeb875..2e9eff59386 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,7 +5,7 @@ // check-pass // compile-flags:-Zno-leak-check -#![allow(drop_copy)] +#![allow(dropping_copy_types)] 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 bff9058a507..722d6747102 100644 --- a/tests/ui/nll/ty-outlives/projection-body.rs +++ b/tests/ui/nll/ty-outlives/projection-body.rs @@ -3,7 +3,7 @@ // // check-pass -#![allow(drop_ref)] +#![allow(dropping_references)] 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 c138d99d303..df6aab0e6a8 100644 --- a/tests/ui/or-patterns/or-patterns-default-binding-modes.rs +++ b/tests/ui/or-patterns/or-patterns-default-binding-modes.rs @@ -3,8 +3,8 @@ // check-pass #![allow(irrefutable_let_patterns)] -#![allow(drop_copy)] -#![allow(drop_ref)] +#![allow(dropping_copy_types)] +#![allow(dropping_references)] 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 965204bf240..43b53b7cf1f 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,8 +2,8 @@ // Test `@` patterns combined with `box` patterns. -#![allow(drop_ref)] -#![allow(drop_copy)] +#![allow(dropping_references)] +#![allow(dropping_copy_types)] #![feature(box_patterns)] 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 3eb5d2cbf54..1df51c0edd9 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,7 +2,7 @@ // Test `Copy` bindings in the rhs of `@` patterns. -#![allow(drop_copy)] +#![allow(dropping_copy_types)] #[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 0550238549e..204cd3e6657 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,6 +1,6 @@ // check-pass -#![allow(drop_ref)] +#![allow(dropping_references)] fn main() {} 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 788975d960a..4de1f653db0 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,6 +1,6 @@ // check-pass -#![allow(drop_ref)] +#![allow(dropping_references)] fn main() { struct U; diff --git a/tests/ui/print_type_sizes/async.rs b/tests/ui/print_type_sizes/async.rs index c73268dc46a..f38a6e674da 100644 --- a/tests/ui/print_type_sizes/async.rs +++ b/tests/ui/print_type_sizes/async.rs @@ -3,7 +3,7 @@ // build-pass // ignore-pass -#![allow(drop_copy)] +#![allow(dropping_copy_types)] async fn wait() {} diff --git a/tests/ui/print_type_sizes/generator_discr_placement.rs b/tests/ui/print_type_sizes/generator_discr_placement.rs index a77a03f0a8a..6adc14f9b99 100644 --- a/tests/ui/print_type_sizes/generator_discr_placement.rs +++ b/tests/ui/print_type_sizes/generator_discr_placement.rs @@ -6,7 +6,7 @@ // Avoid emitting panic handlers, like the rest of these tests... #![feature(generators)] -#![allow(drop_copy)] +#![allow(dropping_copy_types)] pub fn foo() { let a = || { 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 af2bb09805a..0c1e9314441 100644 --- a/tests/ui/regions/type-param-outlives-reempty-issue-74429.rs +++ b/tests/ui/regions/type-param-outlives-reempty-issue-74429.rs @@ -3,7 +3,7 @@ // check-pass -#![allow(drop_copy)] +#![allow(dropping_copy_types)] use std::marker::PhantomData; diff --git a/tests/ui/rfc-2008-non-exhaustive/borrowck-exhaustive.rs b/tests/ui/rfc-2008-non-exhaustive/borrowck-exhaustive.rs index 8f45b989f13..b9ff24c7624 100644 --- a/tests/ui/rfc-2008-non-exhaustive/borrowck-exhaustive.rs +++ b/tests/ui/rfc-2008-non-exhaustive/borrowck-exhaustive.rs @@ -3,7 +3,7 @@ // check-pass -#![allow(drop_ref)] +#![allow(dropping_references)] // 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 4c1562790d5..542be3942b7 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,7 +4,7 @@ // Tests ensuring that `dbg!(expr)` has the expected run-time behavior. // as well as some compile time properties we expect. -#![allow(drop_copy)] +#![allow(dropping_copy_types)] #[derive(Copy, Clone, Debug)] struct Unit; diff --git a/tests/ui/rust-2018/remove-extern-crate.fixed b/tests/ui/rust-2018/remove-extern-crate.fixed index 4ed4d610025..209b91af1dd 100644 --- a/tests/ui/rust-2018/remove-extern-crate.fixed +++ b/tests/ui/rust-2018/remove-extern-crate.fixed @@ -5,7 +5,7 @@ // compile-flags:--extern remove_extern_crate #![warn(rust_2018_idioms)] -#![allow(drop_copy)] +#![allow(dropping_copy_types)] //~ 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 5dafdb2b7b7..ef3c2db696a 100644 --- a/tests/ui/rust-2018/remove-extern-crate.rs +++ b/tests/ui/rust-2018/remove-extern-crate.rs @@ -5,7 +5,7 @@ // compile-flags:--extern remove_extern_crate #![warn(rust_2018_idioms)] -#![allow(drop_copy)] +#![allow(dropping_copy_types)] extern crate core; //~ WARNING unused extern crate // Shouldn't suggest changing to `use`, as `another_name` diff --git a/tests/ui/statics/issue-91050-1.rs b/tests/ui/statics/issue-91050-1.rs index f59bcf0b803..c6268dba567 100644 --- a/tests/ui/statics/issue-91050-1.rs +++ b/tests/ui/statics/issue-91050-1.rs @@ -12,7 +12,7 @@ // // In regular builds, the bad cast was UB, like "Invalid LLVMRustVisibility value!" -#![allow(drop_copy)] +#![allow(dropping_copy_types)] pub mod before { #[no_mangle] diff --git a/tests/ui/traits/copy-guessing.rs b/tests/ui/traits/copy-guessing.rs index c1ed4c28a03..af25010e3bd 100644 --- a/tests/ui/traits/copy-guessing.rs +++ b/tests/ui/traits/copy-guessing.rs @@ -1,5 +1,5 @@ #![allow(dead_code)] -#![allow(drop_copy)] +#![allow(dropping_copy_types)] // "guessing" in trait selection can affect `copy_or_move`. Check that this // is correctly handled. I am not sure what is the "correct" behaviour, diff --git a/tests/ui/traits/impl-evaluation-order.rs b/tests/ui/traits/impl-evaluation-order.rs index 256ce992eef..2ce0b6b0df8 100644 --- a/tests/ui/traits/impl-evaluation-order.rs +++ b/tests/ui/traits/impl-evaluation-order.rs @@ -6,7 +6,7 @@ // check-pass -#![allow(drop_copy)] +#![allow(dropping_copy_types)] trait A { type B; 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 f115e143318..e311a4af2f4 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,7 +14,7 @@ async fn foo() { #[cfg(fail)] let x = &NotSync; bar().await; - #[allow(drop_ref)] + #[allow(dropping_references)] drop(x); } diff --git a/tests/ui/trivial-bounds/trivial-bounds-inconsistent-copy.rs b/tests/ui/trivial-bounds/trivial-bounds-inconsistent-copy.rs index 6ed7667115a..f98c3164d7e 100644 --- a/tests/ui/trivial-bounds/trivial-bounds-inconsistent-copy.rs +++ b/tests/ui/trivial-bounds/trivial-bounds-inconsistent-copy.rs @@ -2,7 +2,7 @@ // Check tautalogically false `Copy` bounds #![feature(trivial_bounds)] -#![allow(drop_ref, drop_copy)] +#![allow(dropping_references, dropping_copy_types)] fn copy_string(t: String) -> String where String: Copy { //~ WARNING trivial_bounds is_copy(&t); |
