Skip to content

Commit

Permalink
List builtin lints one per line for better diffs
Browse files Browse the repository at this point in the history
  • Loading branch information
Keegan McAllister committed Jun 24, 2014
1 parent c747626 commit e67e6e6
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 13 deletions.
17 changes: 13 additions & 4 deletions src/librustc/lint/builtin.rs
Expand Up @@ -1531,9 +1531,18 @@ pub struct HardwiredLints;
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
)
}
}
33 changes: 24 additions & 9 deletions src/librustc/lint/context.rs
Expand Up @@ -136,18 +136,33 @@ impl LintStore {
)*}
))

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.
Expand Down

0 comments on commit e67e6e6

Please sign in to comment.