1
Fork 0

Let lint_forgetting_references give the suggestion if possible

This commit is contained in:
surechen 2024-05-25 11:44:14 +08:00
parent d7f0d1f564
commit ac736d6d88
10 changed files with 383 additions and 45 deletions

View file

@ -237,8 +237,6 @@ lint_dropping_copy_types = calls to `std::mem::drop` with a value that implement
lint_dropping_references = calls to `std::mem::drop` with a reference instead of an owned value 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_duplicate_macro_attribute =
duplicated attribute
@ -273,12 +271,9 @@ lint_for_loops_over_fallibles =
lint_forgetting_copy_types = calls to `std::mem::forget` 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_forgetting_references = calls to `std::mem::forget` with a reference instead of an owned value does nothing
.label = argument has type `{$arg_ty}`
.note = use `let _ = ...` to ignore the expression or result
lint_hidden_glob_reexport = private item shadows public glob re-export
.note_glob_reexport = the name `{$name}` in the {$namespace} namespace is supposed to be publicly re-exported here
@ -897,6 +892,8 @@ lint_unused_op = unused {$op} that must be used
lint_unused_result = unused result of type `{$ty}`
lint_use_let_underscore_ignore_suggestion = use `let _ = ...` to ignore the expression or result
lint_variant_size_differences =
enum variant is more than three times larger ({$largest} bytes) than the next largest