Add let_underscore_must_use
lint.
Similar to `let_underscore_drop`, this lint checks for statements similar to `let _ = foo`, where `foo` is an expression marked `must_use`.
This commit is contained in:
parent
ad7587fedc
commit
758a9fd0f9
4 changed files with 143 additions and 3 deletions
|
@ -317,7 +317,12 @@ fn register_builtins(store: &mut LintStore, no_interleave_lints: bool) {
|
|||
REDUNDANT_SEMICOLONS
|
||||
);
|
||||
|
||||
add_lint_group!("let_underscore", LET_UNDERSCORE_DROP, LET_UNDERSCORE_LOCK);
|
||||
add_lint_group!(
|
||||
"let_underscore",
|
||||
LET_UNDERSCORE_DROP,
|
||||
LET_UNDERSCORE_LOCK,
|
||||
LET_UNDERSCORE_MUST_USE
|
||||
);
|
||||
|
||||
add_lint_group!(
|
||||
"rust_2018_idioms",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue