Skip to content

Commit e67e6e6

Browse files
author
Keegan McAllister
committed
List builtin lints one per line for better diffs
1 parent c747626 commit e67e6e6

File tree

2 files changed

+37
-13
lines changed

2 files changed

+37
-13
lines changed

src/librustc/lint/builtin.rs

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1531,9 +1531,18 @@ pub struct HardwiredLints;
15311531
impl LintPass for HardwiredLints {
15321532
fn get_lints(&self) -> LintArray {
15331533
lint_array!(
1534-
UNUSED_IMPORTS, UNNECESSARY_QUALIFICATION, UNRECOGNIZED_LINT,
1535-
UNUSED_VARIABLE, DEAD_ASSIGNMENT, DEAD_CODE, VISIBLE_PRIVATE_TYPES,
1536-
UNREACHABLE_CODE, WARNINGS, UNKNOWN_FEATURES, UNKNOWN_CRATE_TYPE,
1537-
VARIANT_SIZE_DIFFERENCE)
1534+
UNUSED_IMPORTS,
1535+
UNNECESSARY_QUALIFICATION,
1536+
UNRECOGNIZED_LINT,
1537+
UNUSED_VARIABLE,
1538+
DEAD_ASSIGNMENT,
1539+
DEAD_CODE,
1540+
VISIBLE_PRIVATE_TYPES,
1541+
UNREACHABLE_CODE,
1542+
WARNINGS,
1543+
UNKNOWN_FEATURES,
1544+
UNKNOWN_CRATE_TYPE,
1545+
VARIANT_SIZE_DIFFERENCE
1546+
)
15381547
}
15391548
}

src/librustc/lint/context.rs

Lines changed: 24 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -136,18 +136,33 @@ impl LintStore {
136136
)*}
137137
))
138138

139-
add_builtin!(sess, HardwiredLints,
140-
WhileTrue, UnusedCasts, CTypes, HeapMemory,
141-
UnusedAttribute, PathStatement, UnusedResult,
142-
DeprecatedOwnedVector, NonCamelCaseTypes,
143-
NonSnakeCaseFunctions, NonUppercaseStatics,
144-
NonUppercasePatternStatics, UppercaseVariables,
145-
UnnecessaryParens, UnusedUnsafe, UnsafeBlock,
146-
UnusedMut, UnnecessaryAllocation, Stability,
139+
add_builtin!(sess,
140+
HardwiredLints,
141+
WhileTrue,
142+
UnusedCasts,
143+
CTypes,
144+
HeapMemory,
145+
UnusedAttribute,
146+
PathStatement,
147+
UnusedResult,
148+
DeprecatedOwnedVector,
149+
NonCamelCaseTypes,
150+
NonSnakeCaseFunctions,
151+
NonUppercaseStatics,
152+
NonUppercasePatternStatics,
153+
UppercaseVariables,
154+
UnnecessaryParens,
155+
UnusedUnsafe,
156+
UnsafeBlock,
157+
UnusedMut,
158+
UnnecessaryAllocation,
159+
Stability,
147160
)
148161

149162
add_builtin_with_new!(sess,
150-
TypeLimits, RawPointerDeriving, MissingDoc,
163+
TypeLimits,
164+
RawPointerDeriving,
165+
MissingDoc,
151166
)
152167

153168
// We have one lint pass defined in this module.

0 commit comments

Comments
 (0)