Rename forget_copy lint to forgetting_copy_types

This commit is contained in:
Urgau 2023-05-19 11:19:31 +02:00
parent 9b97ae98f8
commit 234f2b67cb
6 changed files with 8 additions and 8 deletions

View file

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

View file

@ -38,7 +38,7 @@ pub static RENAMED_LINTS: &[(&str, &str)] = &[
("clippy::for_loop_over_option", "for_loops_over_fallibles"),
("clippy::for_loop_over_result", "for_loops_over_fallibles"),
("clippy::for_loops_over_fallibles", "for_loops_over_fallibles"),
("clippy::forget_copy", "forget_copy"),
("clippy::forget_copy", "forgetting_copy_types"),
("clippy::forget_ref", "forget_ref"),
("clippy::into_iter_on_array", "array_into_iter"),
("clippy::invalid_atomic_ordering", "invalid_atomic_ordering"),

View file

@ -5,7 +5,7 @@ use std::mem as memstuff;
use std::mem::forget as forgetSomething;
#[warn(clippy::mem_forget)]
#[allow(forget_copy)]
#[allow(forgetting_copy_types)]
fn main() {
let five: i32 = 5;
forgetSomething(five);

View file

@ -33,7 +33,7 @@
#![allow(dropping_copy_types)]
#![allow(drop_ref)]
#![allow(for_loops_over_fallibles)]
#![allow(forget_copy)]
#![allow(forgetting_copy_types)]
#![allow(forget_ref)]
#![allow(array_into_iter)]
#![allow(invalid_atomic_ordering)]
@ -82,7 +82,7 @@
#![warn(for_loops_over_fallibles)]
#![warn(for_loops_over_fallibles)]
#![warn(for_loops_over_fallibles)]
#![warn(forget_copy)]
#![warn(forgetting_copy_types)]
#![warn(forget_ref)]
#![warn(array_into_iter)]
#![warn(invalid_atomic_ordering)]

View file

@ -33,7 +33,7 @@
#![allow(dropping_copy_types)]
#![allow(drop_ref)]
#![allow(for_loops_over_fallibles)]
#![allow(forget_copy)]
#![allow(forgetting_copy_types)]
#![allow(forget_ref)]
#![allow(array_into_iter)]
#![allow(invalid_atomic_ordering)]

View file

@ -216,11 +216,11 @@ error: lint `clippy::for_loops_over_fallibles` has been renamed to `for_loops_ov
LL | #![warn(clippy::for_loops_over_fallibles)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `for_loops_over_fallibles`
error: lint `clippy::forget_copy` has been renamed to `forget_copy`
error: lint `clippy::forget_copy` has been renamed to `forgetting_copy_types`
--> $DIR/rename.rs:85:9
|
LL | #![warn(clippy::forget_copy)]
| ^^^^^^^^^^^^^^^^^^^ help: use the new name: `forget_copy`
| ^^^^^^^^^^^^^^^^^^^ help: use the new name: `forgetting_copy_types`
error: lint `clippy::forget_ref` has been renamed to `forget_ref`
--> $DIR/rename.rs:86:9