1
Fork 0

A small diagnostic improvement for dropping_copy_types

fixes #125189
This commit is contained in:
surechen 2024-05-22 18:25:26 +08:00
parent 9f432d7b44
commit 09c8e39adb
11 changed files with 169 additions and 11 deletions

View file

@ -197,6 +197,7 @@ lint_drop_trait_constraints =
lint_dropping_copy_types = calls to `std::mem::drop` with a value that implements `Copy` does nothing
.label = argument has type `{$arg_ty}`
.note = use `let _ = ...` to ignore the expression or result
.suggestion = use `let _ = ...` to ignore the expression or result
lint_dropping_references = calls to `std::mem::drop` with a reference instead of an owned value does nothing
.label = argument has type `{$arg_ty}`