Skip to content

Commit 9b97ae9

Browse files
committed
Rename drop_copy lint to dropping_copy_types
1 parent b76b0ae commit 9b97ae9

File tree

6 files changed

+8
-8
lines changed

6 files changed

+8
-8
lines changed

clippy_lints/src/drop_forget_ref.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ impl<'tcx> LateLintPass<'tcx> for DropForgetRef {
9898
let is_copy = is_copy(cx, arg_ty);
9999
let drop_is_single_call_in_arm = is_single_call_in_arm(cx, arg, expr);
100100
let (lint, msg) = match fn_name {
101-
// early return for uplifted lints: drop_ref, drop_copy, forget_ref, forget_copy
101+
// early return for uplifted lints: drop_ref, dropping_copy_types, forget_ref, forget_copy
102102
sym::mem_drop if arg_ty.is_ref() && !drop_is_single_call_in_arm => return,
103103
sym::mem_forget if arg_ty.is_ref() => return,
104104
sym::mem_drop if is_copy && !drop_is_single_call_in_arm => return,

clippy_lints/src/renamed_lints.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ pub static RENAMED_LINTS: &[(&str, &str)] = &[
3333
("clippy::zero_width_space", "clippy::invisible_characters"),
3434
("clippy::clone_double_ref", "suspicious_double_ref_op"),
3535
("clippy::drop_bounds", "drop_bounds"),
36-
("clippy::drop_copy", "drop_copy"),
36+
("clippy::drop_copy", "dropping_copy_types"),
3737
("clippy::drop_ref", "drop_ref"),
3838
("clippy::for_loop_over_option", "for_loops_over_fallibles"),
3939
("clippy::for_loop_over_result", "for_loops_over_fallibles"),

tests/ui/multiple_unsafe_ops_per_block.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#![allow(unused)]
33
#![allow(deref_nullptr)]
44
#![allow(clippy::unnecessary_operation)]
5-
#![allow(drop_copy)]
5+
#![allow(dropping_copy_types)]
66
#![warn(clippy::multiple_unsafe_ops_per_block)]
77

88
extern crate proc_macros;

tests/ui/rename.fixed

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
#![allow(clippy::invisible_characters)]
3131
#![allow(suspicious_double_ref_op)]
3232
#![allow(drop_bounds)]
33-
#![allow(drop_copy)]
33+
#![allow(dropping_copy_types)]
3434
#![allow(drop_ref)]
3535
#![allow(for_loops_over_fallibles)]
3636
#![allow(forget_copy)]
@@ -77,7 +77,7 @@
7777
#![warn(clippy::invisible_characters)]
7878
#![warn(suspicious_double_ref_op)]
7979
#![warn(drop_bounds)]
80-
#![warn(drop_copy)]
80+
#![warn(dropping_copy_types)]
8181
#![warn(drop_ref)]
8282
#![warn(for_loops_over_fallibles)]
8383
#![warn(for_loops_over_fallibles)]

tests/ui/rename.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
#![allow(clippy::invisible_characters)]
3131
#![allow(suspicious_double_ref_op)]
3232
#![allow(drop_bounds)]
33-
#![allow(drop_copy)]
33+
#![allow(dropping_copy_types)]
3434
#![allow(drop_ref)]
3535
#![allow(for_loops_over_fallibles)]
3636
#![allow(forget_copy)]

tests/ui/rename.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,11 +186,11 @@ error: lint `clippy::drop_bounds` has been renamed to `drop_bounds`
186186
LL | #![warn(clippy::drop_bounds)]
187187
| ^^^^^^^^^^^^^^^^^^^ help: use the new name: `drop_bounds`
188188

189-
error: lint `clippy::drop_copy` has been renamed to `drop_copy`
189+
error: lint `clippy::drop_copy` has been renamed to `dropping_copy_types`
190190
--> $DIR/rename.rs:80:9
191191
|
192192
LL | #![warn(clippy::drop_copy)]
193-
| ^^^^^^^^^^^^^^^^^ help: use the new name: `drop_copy`
193+
| ^^^^^^^^^^^^^^^^^ help: use the new name: `dropping_copy_types`
194194

195195
error: lint `clippy::drop_ref` has been renamed to `drop_ref`
196196
--> $DIR/rename.rs:81:9

0 commit comments

Comments
 (0)