Skip to content

Commit fdbfe0e

Browse files
committed
Rename drop_ref lint to dropping_references
1 parent 234f2b6 commit fdbfe0e

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

clippy_lints/src/drop_forget_ref.rs

+1-1
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, dropping_copy_types, forget_ref, forgetting_copy_types
101+
// early return for uplifted lints: dropping_references, dropping_copy_types, forget_ref, forgetting_copy_types
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

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ pub static RENAMED_LINTS: &[(&str, &str)] = &[
3434
("clippy::clone_double_ref", "suspicious_double_ref_op"),
3535
("clippy::drop_bounds", "drop_bounds"),
3636
("clippy::drop_copy", "dropping_copy_types"),
37-
("clippy::drop_ref", "drop_ref"),
37+
("clippy::drop_ref", "dropping_references"),
3838
("clippy::for_loop_over_option", "for_loops_over_fallibles"),
3939
("clippy::for_loop_over_result", "for_loops_over_fallibles"),
4040
("clippy::for_loops_over_fallibles", "for_loops_over_fallibles"),

tests/ui/rename.fixed

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
#![allow(suspicious_double_ref_op)]
3232
#![allow(drop_bounds)]
3333
#![allow(dropping_copy_types)]
34-
#![allow(drop_ref)]
34+
#![allow(dropping_references)]
3535
#![allow(for_loops_over_fallibles)]
3636
#![allow(forgetting_copy_types)]
3737
#![allow(forget_ref)]
@@ -78,7 +78,7 @@
7878
#![warn(suspicious_double_ref_op)]
7979
#![warn(drop_bounds)]
8080
#![warn(dropping_copy_types)]
81-
#![warn(drop_ref)]
81+
#![warn(dropping_references)]
8282
#![warn(for_loops_over_fallibles)]
8383
#![warn(for_loops_over_fallibles)]
8484
#![warn(for_loops_over_fallibles)]

tests/ui/rename.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
#![allow(suspicious_double_ref_op)]
3232
#![allow(drop_bounds)]
3333
#![allow(dropping_copy_types)]
34-
#![allow(drop_ref)]
34+
#![allow(dropping_references)]
3535
#![allow(for_loops_over_fallibles)]
3636
#![allow(forgetting_copy_types)]
3737
#![allow(forget_ref)]

tests/ui/rename.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -192,11 +192,11 @@ error: lint `clippy::drop_copy` has been renamed to `dropping_copy_types`
192192
LL | #![warn(clippy::drop_copy)]
193193
| ^^^^^^^^^^^^^^^^^ help: use the new name: `dropping_copy_types`
194194

195-
error: lint `clippy::drop_ref` has been renamed to `drop_ref`
195+
error: lint `clippy::drop_ref` has been renamed to `dropping_references`
196196
--> $DIR/rename.rs:81:9
197197
|
198198
LL | #![warn(clippy::drop_ref)]
199-
| ^^^^^^^^^^^^^^^^ help: use the new name: `drop_ref`
199+
| ^^^^^^^^^^^^^^^^ help: use the new name: `dropping_references`
200200

201201
error: lint `clippy::for_loop_over_option` has been renamed to `for_loops_over_fallibles`
202202
--> $DIR/rename.rs:82:9

0 commit comments

Comments
 (0)