From 9b97ae98f83c425ce62fba4a8d6ffe353d530d9d Mon Sep 17 00:00:00 2001 From: Urgau Date: Fri, 19 May 2023 11:14:55 +0200 Subject: [PATCH] Rename `drop_copy` lint to `dropping_copy_types` --- clippy_lints/src/drop_forget_ref.rs | 2 +- clippy_lints/src/renamed_lints.rs | 2 +- tests/ui/multiple_unsafe_ops_per_block.rs | 2 +- tests/ui/rename.fixed | 4 ++-- tests/ui/rename.rs | 2 +- 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 b2f7d026cc8..9a7b39e1544 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, drop_copy, forget_ref, forget_copy + // early return for uplifted lints: drop_ref, dropping_copy_types, forget_ref, forget_copy 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 a2c3465cde4..308e40abf6a 100644 --- a/clippy_lints/src/renamed_lints.rs +++ b/clippy_lints/src/renamed_lints.rs @@ -33,7 +33,7 @@ pub static RENAMED_LINTS: &[(&str, &str)] = &[ ("clippy::zero_width_space", "clippy::invisible_characters"), ("clippy::clone_double_ref", "suspicious_double_ref_op"), ("clippy::drop_bounds", "drop_bounds"), - ("clippy::drop_copy", "drop_copy"), + ("clippy::drop_copy", "dropping_copy_types"), ("clippy::drop_ref", "drop_ref"), ("clippy::for_loop_over_option", "for_loops_over_fallibles"), ("clippy::for_loop_over_result", "for_loops_over_fallibles"), diff --git a/tests/ui/multiple_unsafe_ops_per_block.rs b/tests/ui/multiple_unsafe_ops_per_block.rs index f28153e56b0..4ef6f0ca92f 100644 --- a/tests/ui/multiple_unsafe_ops_per_block.rs +++ b/tests/ui/multiple_unsafe_ops_per_block.rs @@ -2,7 +2,7 @@ #![allow(unused)] #![allow(deref_nullptr)] #![allow(clippy::unnecessary_operation)] -#![allow(drop_copy)] +#![allow(dropping_copy_types)] #![warn(clippy::multiple_unsafe_ops_per_block)] extern crate proc_macros; diff --git a/tests/ui/rename.fixed b/tests/ui/rename.fixed index 7c2acf43fe8..8633e422805 100644 --- a/tests/ui/rename.fixed +++ b/tests/ui/rename.fixed @@ -30,7 +30,7 @@ #![allow(clippy::invisible_characters)] #![allow(suspicious_double_ref_op)] #![allow(drop_bounds)] -#![allow(drop_copy)] +#![allow(dropping_copy_types)] #![allow(drop_ref)] #![allow(for_loops_over_fallibles)] #![allow(forget_copy)] @@ -77,7 +77,7 @@ #![warn(clippy::invisible_characters)] #![warn(suspicious_double_ref_op)] #![warn(drop_bounds)] -#![warn(drop_copy)] +#![warn(dropping_copy_types)] #![warn(drop_ref)] #![warn(for_loops_over_fallibles)] #![warn(for_loops_over_fallibles)] diff --git a/tests/ui/rename.rs b/tests/ui/rename.rs index 8d334b0d050..07b33b4da95 100644 --- a/tests/ui/rename.rs +++ b/tests/ui/rename.rs @@ -30,7 +30,7 @@ #![allow(clippy::invisible_characters)] #![allow(suspicious_double_ref_op)] #![allow(drop_bounds)] -#![allow(drop_copy)] +#![allow(dropping_copy_types)] #![allow(drop_ref)] #![allow(for_loops_over_fallibles)] #![allow(forget_copy)] diff --git a/tests/ui/rename.stderr b/tests/ui/rename.stderr index fbf8d3d7e4e..20e7d96b720 100644 --- a/tests/ui/rename.stderr +++ b/tests/ui/rename.stderr @@ -186,11 +186,11 @@ error: lint `clippy::drop_bounds` has been renamed to `drop_bounds` LL | #![warn(clippy::drop_bounds)] | ^^^^^^^^^^^^^^^^^^^ help: use the new name: `drop_bounds` -error: lint `clippy::drop_copy` has been renamed to `drop_copy` +error: lint `clippy::drop_copy` has been renamed to `dropping_copy_types` --> $DIR/rename.rs:80:9 | LL | #![warn(clippy::drop_copy)] - | ^^^^^^^^^^^^^^^^^ help: use the new name: `drop_copy` + | ^^^^^^^^^^^^^^^^^ help: use the new name: `dropping_copy_types` error: lint `clippy::drop_ref` has been renamed to `drop_ref` --> $DIR/rename.rs:81:9