Skip to content

Commit 915ff71

Browse files
committed
Rename forget_ref lint to forgetting_references
1 parent fdbfe0e commit 915ff71

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: dropping_references, dropping_copy_types, forget_ref, forgetting_copy_types
101+
// early return for uplifted lints: dropping_references, dropping_copy_types, forgetting_references, 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
@@ -39,7 +39,7 @@ pub static RENAMED_LINTS: &[(&str, &str)] = &[
3939
("clippy::for_loop_over_result", "for_loops_over_fallibles"),
4040
("clippy::for_loops_over_fallibles", "for_loops_over_fallibles"),
4141
("clippy::forget_copy", "forgetting_copy_types"),
42-
("clippy::forget_ref", "forget_ref"),
42+
("clippy::forget_ref", "forgetting_references"),
4343
("clippy::into_iter_on_array", "array_into_iter"),
4444
("clippy::invalid_atomic_ordering", "invalid_atomic_ordering"),
4545
("clippy::invalid_ref", "invalid_value"),

tests/ui/rename.fixed

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
#![allow(dropping_references)]
3535
#![allow(for_loops_over_fallibles)]
3636
#![allow(forgetting_copy_types)]
37-
#![allow(forget_ref)]
37+
#![allow(forgetting_references)]
3838
#![allow(array_into_iter)]
3939
#![allow(invalid_atomic_ordering)]
4040
#![allow(invalid_value)]
@@ -83,7 +83,7 @@
8383
#![warn(for_loops_over_fallibles)]
8484
#![warn(for_loops_over_fallibles)]
8585
#![warn(forgetting_copy_types)]
86-
#![warn(forget_ref)]
86+
#![warn(forgetting_references)]
8787
#![warn(array_into_iter)]
8888
#![warn(invalid_atomic_ordering)]
8989
#![warn(invalid_value)]

tests/ui/rename.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
#![allow(dropping_references)]
3535
#![allow(for_loops_over_fallibles)]
3636
#![allow(forgetting_copy_types)]
37-
#![allow(forget_ref)]
37+
#![allow(forgetting_references)]
3838
#![allow(array_into_iter)]
3939
#![allow(invalid_atomic_ordering)]
4040
#![allow(invalid_value)]

tests/ui/rename.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -222,11 +222,11 @@ error: lint `clippy::forget_copy` has been renamed to `forgetting_copy_types`
222222
LL | #![warn(clippy::forget_copy)]
223223
| ^^^^^^^^^^^^^^^^^^^ help: use the new name: `forgetting_copy_types`
224224

225-
error: lint `clippy::forget_ref` has been renamed to `forget_ref`
225+
error: lint `clippy::forget_ref` has been renamed to `forgetting_references`
226226
--> $DIR/rename.rs:86:9
227227
|
228228
LL | #![warn(clippy::forget_ref)]
229-
| ^^^^^^^^^^^^^^^^^^ help: use the new name: `forget_ref`
229+
| ^^^^^^^^^^^^^^^^^^ help: use the new name: `forgetting_references`
230230

231231
error: lint `clippy::into_iter_on_array` has been renamed to `array_into_iter`
232232
--> $DIR/rename.rs:87:9

0 commit comments

Comments
 (0)