diff options
| author | Urgau <urgau@numericable.fr> | 2023-05-19 11:14:55 +0200 | 
|---|---|---|
| committer | Urgau <urgau@numericable.fr> | 2023-05-21 13:37:32 +0200 | 
| commit | 1c7ab18c08109753b795bff83dd838ac8e4cdb70 (patch) | |
| tree | d04414ef8f18c0677f2435b117eb2775922c4614 /compiler/rustc_lint/src/drop_forget_useless.rs | |
| parent | d77014a608a97884e547d4215517ccd4babb2088 (diff) | |
| download | rust-1c7ab18c08109753b795bff83dd838ac8e4cdb70.tar.gz rust-1c7ab18c08109753b795bff83dd838ac8e4cdb70.zip  | |
Rename `drop_copy` lint to `dropping_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 259abc2af11..e61adc61e5e 100644 --- a/compiler/rustc_lint/src/drop_forget_useless.rs +++ b/compiler/rustc_lint/src/drop_forget_useless.rs @@ -58,7 +58,7 @@ declare_lint! { } declare_lint! { - /// The `drop_copy` lint checks for calls to `std::mem::drop` with a value + /// The `dropping_copy_types` lint checks for calls to `std::mem::drop` with a value /// that derives the Copy trait. /// /// ### Example @@ -76,7 +76,7 @@ declare_lint! { /// Calling `std::mem::drop` [does nothing for types that /// implement Copy](https://doc.rust-lang.org/std/mem/fn.drop.html), since the /// value will be copied and moved into the function on invocation. - pub DROP_COPY, + pub DROPPING_COPY_TYPES, Warn, "calls to `std::mem::drop` with a value that implements Copy" } @@ -109,7 +109,7 @@ declare_lint! { "calls to `std::mem::forget` with a value that implements Copy" } -declare_lint_pass!(DropForgetUseless => [DROP_REF, FORGET_REF, DROP_COPY, FORGET_COPY]); +declare_lint_pass!(DropForgetUseless => [DROP_REF, FORGET_REF, DROPPING_COPY_TYPES, FORGET_COPY]); impl<'tcx> LateLintPass<'tcx> for DropForgetUseless { fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'tcx>) { @@ -129,7 +129,7 @@ impl<'tcx> LateLintPass<'tcx> for DropForgetUseless { cx.emit_spanned_lint(FORGET_REF, expr.span, ForgetRefDiag { arg_ty, label: arg.span }); }, sym::mem_drop if is_copy && !drop_is_single_call_in_arm => { - cx.emit_spanned_lint(DROP_COPY, expr.span, DropCopyDiag { arg_ty, label: arg.span }); + 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 });  | 
