diff options
| author | Urgau <urgau@numericable.fr> | 2023-05-19 11:19:31 +0200 |
|---|---|---|
| committer | Urgau <urgau@numericable.fr> | 2023-05-21 14:09:03 +0200 |
| commit | 85a18289431d245437d80b3006ec499c23e62400 (patch) | |
| tree | d864fe93eead4a4d09be8af5c95bce4cefa1a4ff /compiler/rustc_lint/src/drop_forget_useless.rs | |
| parent | 1c7ab18c08109753b795bff83dd838ac8e4cdb70 (diff) | |
| download | rust-85a18289431d245437d80b3006ec499c23e62400.tar.gz rust-85a18289431d245437d80b3006ec499c23e62400.zip | |
Rename `forget_copy` lint to `forgetting_copy_types`
Diffstat (limited to 'compiler/rustc_lint/src/drop_forget_useless.rs')
| -rw-r--r-- | compiler/rustc_lint/src/drop_forget_useless.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/rustc_lint/src/drop_forget_useless.rs b/compiler/rustc_lint/src/drop_forget_useless.rs index e61adc61e5e..8f3f4914dde 100644 --- a/compiler/rustc_lint/src/drop_forget_useless.rs +++ b/compiler/rustc_lint/src/drop_forget_useless.rs @@ -82,7 +82,7 @@ declare_lint! { } declare_lint! { - /// The `forget_copy` lint checks for calls to `std::mem::forget` with a value + /// The `forgetting_copy_types` lint checks for calls to `std::mem::forget` with a value /// that derives the Copy trait. /// /// ### Example @@ -104,12 +104,12 @@ declare_lint! { /// An alternative, but also valid, explanation is that Copy types do not /// implement the Drop trait, which means they have no destructors. Without a /// destructor, there is nothing for `std::mem::forget` to ignore. - pub FORGET_COPY, + pub FORGETTING_COPY_TYPES, Warn, "calls to `std::mem::forget` with a value that implements Copy" } -declare_lint_pass!(DropForgetUseless => [DROP_REF, FORGET_REF, DROPPING_COPY_TYPES, FORGET_COPY]); +declare_lint_pass!(DropForgetUseless => [DROP_REF, FORGET_REF, DROPPING_COPY_TYPES, FORGETTING_COPY_TYPES]); impl<'tcx> LateLintPass<'tcx> for DropForgetUseless { fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'tcx>) { @@ -132,7 +132,7 @@ impl<'tcx> LateLintPass<'tcx> for DropForgetUseless { cx.emit_spanned_lint(DROPPING_COPY_TYPES, expr.span, DropCopyDiag { arg_ty, label: arg.span }); } sym::mem_forget if is_copy => { - cx.emit_spanned_lint(FORGET_COPY, expr.span, ForgetCopyDiag { arg_ty, label: arg.span }); + cx.emit_spanned_lint(FORGETTING_COPY_TYPES, expr.span, ForgetCopyDiag { arg_ty, label: arg.span }); } _ => return, }; |
