diff options
| author | Urgau <urgau@numericable.fr> | 2023-05-19 11:19:31 +0200 |
|---|---|---|
| committer | Urgau <urgau@numericable.fr> | 2023-05-21 14:09:03 +0200 |
| commit | 234f2b67cb7435734c697517eac2afa154b35b0e (patch) | |
| tree | 226008782a8e6eb5ab0981aa772f46206d57cf00 | |
| parent | 9b97ae98f83c425ce62fba4a8d6ffe353d530d9d (diff) | |
| download | rust-234f2b67cb7435734c697517eac2afa154b35b0e.tar.gz rust-234f2b67cb7435734c697517eac2afa154b35b0e.zip | |
Rename `forget_copy` lint to `forgetting_copy_types`
| -rw-r--r-- | clippy_lints/src/drop_forget_ref.rs | 2 | ||||
| -rw-r--r-- | clippy_lints/src/renamed_lints.rs | 2 | ||||
| -rw-r--r-- | tests/ui/mem_forget.rs | 2 | ||||
| -rw-r--r-- | tests/ui/rename.fixed | 4 | ||||
| -rw-r--r-- | tests/ui/rename.rs | 2 | ||||
| -rw-r--r-- | tests/ui/rename.stderr | 4 |
6 files changed, 8 insertions, 8 deletions
diff --git a/clippy_lints/src/drop_forget_ref.rs b/clippy_lints/src/drop_forget_ref.rs index 9a7b39e1544..db1b8494890 100644 --- a/clippy_lints/src/drop_forget_ref.rs +++ b/clippy_lints/src/drop_forget_ref.rs @@ -98,7 +98,7 @@ impl<'tcx> LateLintPass<'tcx> for DropForgetRef { let is_copy = is_copy(cx, arg_ty); let drop_is_single_call_in_arm = is_single_call_in_arm(cx, arg, expr); let (lint, msg) = match fn_name { - // early return for uplifted lints: drop_ref, dropping_copy_types, forget_ref, forget_copy + // early return for uplifted lints: drop_ref, dropping_copy_types, forget_ref, forgetting_copy_types sym::mem_drop if arg_ty.is_ref() && !drop_is_single_call_in_arm => return, sym::mem_forget if arg_ty.is_ref() => return, sym::mem_drop if is_copy && !drop_is_single_call_in_arm => return, diff --git a/clippy_lints/src/renamed_lints.rs b/clippy_lints/src/renamed_lints.rs index 308e40abf6a..a81dbb9b259 100644 --- a/clippy_lints/src/renamed_lints.rs +++ b/clippy_lints/src/renamed_lints.rs @@ -38,7 +38,7 @@ pub static RENAMED_LINTS: &[(&str, &str)] = &[ ("clippy::for_loop_over_option", "for_loops_over_fallibles"), ("clippy::for_loop_over_result", "for_loops_over_fallibles"), ("clippy::for_loops_over_fallibles", "for_loops_over_fallibles"), - ("clippy::forget_copy", "forget_copy"), + ("clippy::forget_copy", "forgetting_copy_types"), ("clippy::forget_ref", "forget_ref"), ("clippy::into_iter_on_array", "array_into_iter"), ("clippy::invalid_atomic_ordering", "invalid_atomic_ordering"), diff --git a/tests/ui/mem_forget.rs b/tests/ui/mem_forget.rs index 5137448a6d4..edb9d87d032 100644 --- a/tests/ui/mem_forget.rs +++ b/tests/ui/mem_forget.rs @@ -5,7 +5,7 @@ use std::mem as memstuff; use std::mem::forget as forgetSomething; #[warn(clippy::mem_forget)] -#[allow(forget_copy)] +#[allow(forgetting_copy_types)] fn main() { let five: i32 = 5; forgetSomething(five); diff --git a/tests/ui/rename.fixed b/tests/ui/rename.fixed index 8633e422805..8df63fd9b23 100644 --- a/tests/ui/rename.fixed +++ b/tests/ui/rename.fixed @@ -33,7 +33,7 @@ #![allow(dropping_copy_types)] #![allow(drop_ref)] #![allow(for_loops_over_fallibles)] -#![allow(forget_copy)] +#![allow(forgetting_copy_types)] #![allow(forget_ref)] #![allow(array_into_iter)] #![allow(invalid_atomic_ordering)] @@ -82,7 +82,7 @@ #![warn(for_loops_over_fallibles)] #![warn(for_loops_over_fallibles)] #![warn(for_loops_over_fallibles)] -#![warn(forget_copy)] +#![warn(forgetting_copy_types)] #![warn(forget_ref)] #![warn(array_into_iter)] #![warn(invalid_atomic_ordering)] diff --git a/tests/ui/rename.rs b/tests/ui/rename.rs index 07b33b4da95..7206e19f1e0 100644 --- a/tests/ui/rename.rs +++ b/tests/ui/rename.rs @@ -33,7 +33,7 @@ #![allow(dropping_copy_types)] #![allow(drop_ref)] #![allow(for_loops_over_fallibles)] -#![allow(forget_copy)] +#![allow(forgetting_copy_types)] #![allow(forget_ref)] #![allow(array_into_iter)] #![allow(invalid_atomic_ordering)] diff --git a/tests/ui/rename.stderr b/tests/ui/rename.stderr index 20e7d96b720..c2a7c0dd7eb 100644 --- a/tests/ui/rename.stderr +++ b/tests/ui/rename.stderr @@ -216,11 +216,11 @@ error: lint `clippy::for_loops_over_fallibles` has been renamed to `for_loops_ov LL | #![warn(clippy::for_loops_over_fallibles)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `for_loops_over_fallibles` -error: lint `clippy::forget_copy` has been renamed to `forget_copy` +error: lint `clippy::forget_copy` has been renamed to `forgetting_copy_types` --> $DIR/rename.rs:85:9 | LL | #![warn(clippy::forget_copy)] - | ^^^^^^^^^^^^^^^^^^^ help: use the new name: `forget_copy` + | ^^^^^^^^^^^^^^^^^^^ help: use the new name: `forgetting_copy_types` error: lint `clippy::forget_ref` has been renamed to `forget_ref` --> $DIR/rename.rs:86:9 |
