mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-29 20:46:07 +03:00
List builtin lints one per line for better diffs
This commit is contained in:
@@ -1531,9 +1531,18 @@ fn check_expr(&mut self, cx: &Context, e: &ast::Expr) {
|
||||
impl LintPass for HardwiredLints {
|
||||
fn get_lints(&self) -> LintArray {
|
||||
lint_array!(
|
||||
UNUSED_IMPORTS, UNNECESSARY_QUALIFICATION, UNRECOGNIZED_LINT,
|
||||
UNUSED_VARIABLE, DEAD_ASSIGNMENT, DEAD_CODE, VISIBLE_PRIVATE_TYPES,
|
||||
UNREACHABLE_CODE, WARNINGS, UNKNOWN_FEATURES, UNKNOWN_CRATE_TYPE,
|
||||
VARIANT_SIZE_DIFFERENCE)
|
||||
UNUSED_IMPORTS,
|
||||
UNNECESSARY_QUALIFICATION,
|
||||
UNRECOGNIZED_LINT,
|
||||
UNUSED_VARIABLE,
|
||||
DEAD_ASSIGNMENT,
|
||||
DEAD_CODE,
|
||||
VISIBLE_PRIVATE_TYPES,
|
||||
UNREACHABLE_CODE,
|
||||
WARNINGS,
|
||||
UNKNOWN_FEATURES,
|
||||
UNKNOWN_CRATE_TYPE,
|
||||
VARIANT_SIZE_DIFFERENCE
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -136,18 +136,33 @@ macro_rules! add_builtin_with_new ( ( $sess:ident, $($name:ident),*, ) => (
|
||||
)*}
|
||||
))
|
||||
|
||||
add_builtin!(sess, HardwiredLints,
|
||||
WhileTrue, UnusedCasts, CTypes, HeapMemory,
|
||||
UnusedAttribute, PathStatement, UnusedResult,
|
||||
DeprecatedOwnedVector, NonCamelCaseTypes,
|
||||
NonSnakeCaseFunctions, NonUppercaseStatics,
|
||||
NonUppercasePatternStatics, UppercaseVariables,
|
||||
UnnecessaryParens, UnusedUnsafe, UnsafeBlock,
|
||||
UnusedMut, UnnecessaryAllocation, Stability,
|
||||
add_builtin!(sess,
|
||||
HardwiredLints,
|
||||
WhileTrue,
|
||||
UnusedCasts,
|
||||
CTypes,
|
||||
HeapMemory,
|
||||
UnusedAttribute,
|
||||
PathStatement,
|
||||
UnusedResult,
|
||||
DeprecatedOwnedVector,
|
||||
NonCamelCaseTypes,
|
||||
NonSnakeCaseFunctions,
|
||||
NonUppercaseStatics,
|
||||
NonUppercasePatternStatics,
|
||||
UppercaseVariables,
|
||||
UnnecessaryParens,
|
||||
UnusedUnsafe,
|
||||
UnsafeBlock,
|
||||
UnusedMut,
|
||||
UnnecessaryAllocation,
|
||||
Stability,
|
||||
)
|
||||
|
||||
add_builtin_with_new!(sess,
|
||||
TypeLimits, RawPointerDeriving, MissingDoc,
|
||||
TypeLimits,
|
||||
RawPointerDeriving,
|
||||
MissingDoc,
|
||||
)
|
||||
|
||||
// We have one lint pass defined in this module.
|
||||
|
||||
Reference in New Issue
Block a user