Skip to content

Commit 234f2b6

Browse files
committed
Rename forget_copy lint to forgetting_copy_types
1 parent 9b97ae9 commit 234f2b6

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ pub static RENAMED_LINTS: &[(&str, &str)] = &[
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"),
41-
("clippy::forget_copy", "forget_copy"),
41+
("clippy::forget_copy", "forgetting_copy_types"),
4242
("clippy::forget_ref", "forget_ref"),
4343
("clippy::into_iter_on_array", "array_into_iter"),
4444
("clippy::invalid_atomic_ordering", "invalid_atomic_ordering"),

tests/ui/mem_forget.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use std::mem as memstuff;
55
use std::mem::forget as forgetSomething;
66

77
#[warn(clippy::mem_forget)]
8-
#[allow(forget_copy)]
8+
#[allow(forgetting_copy_types)]
99
fn main() {
1010
let five: i32 = 5;
1111
forgetSomething(five);

tests/ui/rename.fixed

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
#![allow(dropping_copy_types)]
3434
#![allow(drop_ref)]
3535
#![allow(for_loops_over_fallibles)]
36-
#![allow(forget_copy)]
36+
#![allow(forgetting_copy_types)]
3737
#![allow(forget_ref)]
3838
#![allow(array_into_iter)]
3939
#![allow(invalid_atomic_ordering)]
@@ -82,7 +82,7 @@
8282
#![warn(for_loops_over_fallibles)]
8383
#![warn(for_loops_over_fallibles)]
8484
#![warn(for_loops_over_fallibles)]
85-
#![warn(forget_copy)]
85+
#![warn(forgetting_copy_types)]
8686
#![warn(forget_ref)]
8787
#![warn(array_into_iter)]
8888
#![warn(invalid_atomic_ordering)]

tests/ui/rename.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
#![allow(dropping_copy_types)]
3434
#![allow(drop_ref)]
3535
#![allow(for_loops_over_fallibles)]
36-
#![allow(forget_copy)]
36+
#![allow(forgetting_copy_types)]
3737
#![allow(forget_ref)]
3838
#![allow(array_into_iter)]
3939
#![allow(invalid_atomic_ordering)]

tests/ui/rename.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,11 +216,11 @@ error: lint `clippy::for_loops_over_fallibles` has been renamed to `for_loops_ov
216216
LL | #![warn(clippy::for_loops_over_fallibles)]
217217
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `for_loops_over_fallibles`
218218

219-
error: lint `clippy::forget_copy` has been renamed to `forget_copy`
219+
error: lint `clippy::forget_copy` has been renamed to `forgetting_copy_types`
220220
--> $DIR/rename.rs:85:9
221221
|
222222
LL | #![warn(clippy::forget_copy)]
223-
| ^^^^^^^^^^^^^^^^^^^ help: use the new name: `forget_copy`
223+
| ^^^^^^^^^^^^^^^^^^^ help: use the new name: `forgetting_copy_types`
224224

225225
error: lint `clippy::forget_ref` has been renamed to `forget_ref`
226226
--> $DIR/rename.rs:86:9

0 commit comments

Comments
 (0)