Update the unused lint group to include more lints
This commit is contained in:
parent
94bcd3539c
commit
333592edde
2 changed files with 6 additions and 5 deletions
|
|
@ -631,7 +631,7 @@ impl LintPass for UnusedAttribute {
|
|||
}
|
||||
}
|
||||
|
||||
declare_lint!(PATH_STATEMENT, Warn,
|
||||
declare_lint!(pub PATH_STATEMENT, Warn,
|
||||
"path statements with no effect")
|
||||
|
||||
pub struct PathStatement;
|
||||
|
|
@ -655,10 +655,10 @@ impl LintPass for PathStatement {
|
|||
}
|
||||
}
|
||||
|
||||
declare_lint!(UNUSED_MUST_USE, Warn,
|
||||
declare_lint!(pub UNUSED_MUST_USE, Warn,
|
||||
"unused result of a type flagged as #[must_use]")
|
||||
|
||||
declare_lint!(UNUSED_RESULT, Allow,
|
||||
declare_lint!(pub UNUSED_RESULT, Allow,
|
||||
"unused result of an expression in a statement")
|
||||
|
||||
pub struct UnusedResult;
|
||||
|
|
@ -1136,7 +1136,7 @@ impl LintPass for UnnecessaryImportBraces {
|
|||
}
|
||||
}
|
||||
|
||||
declare_lint!(UNUSED_UNSAFE, Warn,
|
||||
declare_lint!(pub UNUSED_UNSAFE, Warn,
|
||||
"unnecessary use of an `unsafe` block")
|
||||
|
||||
pub struct UnusedUnsafe;
|
||||
|
|
|
|||
|
|
@ -203,7 +203,8 @@ impl LintStore {
|
|||
|
||||
add_lint_group!(sess, "unused",
|
||||
UNUSED_IMPORTS, UNUSED_VARIABLE, DEAD_ASSIGNMENT, DEAD_CODE,
|
||||
UNUSED_MUT, UNREACHABLE_CODE, UNUSED_EXTERN_CRATE)
|
||||
UNUSED_MUT, UNREACHABLE_CODE, UNUSED_EXTERN_CRATE, UNUSED_MUST_USE,
|
||||
UNUSED_UNSAFE, UNUSED_RESULT, PATH_STATEMENT)
|
||||
|
||||
// We have one lint pass defined in this module.
|
||||
self.register_pass(sess, false, box GatherNodeLevels as LintPassObject);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue