This commit is contained in:
parent
e3270c6f47
commit
e9e0a7e3bd
129 changed files with 588 additions and 4 deletions
|
@ -60,6 +60,10 @@ impl LintPass for Pass {
|
||||||
fn get_lints(&self) -> LintArray {
|
fn get_lints(&self) -> LintArray {
|
||||||
lint_array!(APPROX_CONSTANT)
|
lint_array!(APPROX_CONSTANT)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn name(&self) -> &'static str {
|
||||||
|
"ApproxConstant"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Pass {
|
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Pass {
|
||||||
|
|
|
@ -52,6 +52,10 @@ impl LintPass for Arithmetic {
|
||||||
fn get_lints(&self) -> LintArray {
|
fn get_lints(&self) -> LintArray {
|
||||||
lint_array!(INTEGER_ARITHMETIC, FLOAT_ARITHMETIC)
|
lint_array!(INTEGER_ARITHMETIC, FLOAT_ARITHMETIC)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn name(&self) -> &'static str {
|
||||||
|
"Arithmetic"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Arithmetic {
|
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Arithmetic {
|
||||||
|
|
|
@ -34,6 +34,10 @@ impl LintPass for AssertionsOnConstants {
|
||||||
fn get_lints(&self) -> LintArray {
|
fn get_lints(&self) -> LintArray {
|
||||||
lint_array![ASSERTIONS_ON_CONSTANTS]
|
lint_array![ASSERTIONS_ON_CONSTANTS]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn name(&self) -> &'static str {
|
||||||
|
"AssertionsOnConstants"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for AssertionsOnConstants {
|
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for AssertionsOnConstants {
|
||||||
|
|
|
@ -57,6 +57,10 @@ impl LintPass for AssignOps {
|
||||||
fn get_lints(&self) -> LintArray {
|
fn get_lints(&self) -> LintArray {
|
||||||
lint_array!(ASSIGN_OP_PATTERN, MISREFACTORED_ASSIGN_OP)
|
lint_array!(ASSIGN_OP_PATTERN, MISREFACTORED_ASSIGN_OP)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn name(&self) -> &'static str {
|
||||||
|
"AssignOps"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for AssignOps {
|
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for AssignOps {
|
||||||
|
|
|
@ -199,6 +199,10 @@ impl LintPass for AttrPass {
|
||||||
UNKNOWN_CLIPPY_LINTS,
|
UNKNOWN_CLIPPY_LINTS,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn name(&self) -> &'static str {
|
||||||
|
"Attributes"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for AttrPass {
|
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for AttrPass {
|
||||||
|
@ -500,6 +504,10 @@ impl LintPass for CfgAttrPass {
|
||||||
fn get_lints(&self) -> LintArray {
|
fn get_lints(&self) -> LintArray {
|
||||||
lint_array!(DEPRECATED_CFG_ATTR,)
|
lint_array!(DEPRECATED_CFG_ATTR,)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn name(&self) -> &'static str {
|
||||||
|
"DeprecatedCfgAttribute"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl EarlyLintPass for CfgAttrPass {
|
impl EarlyLintPass for CfgAttrPass {
|
||||||
|
|
|
@ -108,6 +108,9 @@ impl LintPass for BitMask {
|
||||||
fn get_lints(&self) -> LintArray {
|
fn get_lints(&self) -> LintArray {
|
||||||
lint_array!(BAD_BIT_MASK, INEFFECTIVE_BIT_MASK, VERBOSE_BIT_MASK)
|
lint_array!(BAD_BIT_MASK, INEFFECTIVE_BIT_MASK, VERBOSE_BIT_MASK)
|
||||||
}
|
}
|
||||||
|
fn name(&self) -> &'static str {
|
||||||
|
"BitMask"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for BitMask {
|
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for BitMask {
|
||||||
|
|
|
@ -37,6 +37,9 @@ impl LintPass for BlackListedName {
|
||||||
fn get_lints(&self) -> LintArray {
|
fn get_lints(&self) -> LintArray {
|
||||||
lint_array!(BLACKLISTED_NAME)
|
lint_array!(BLACKLISTED_NAME)
|
||||||
}
|
}
|
||||||
|
fn name(&self) -> &'static str {
|
||||||
|
"BlacklistedName"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for BlackListedName {
|
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for BlackListedName {
|
||||||
|
|
|
@ -49,6 +49,10 @@ impl LintPass for BlockInIfCondition {
|
||||||
fn get_lints(&self) -> LintArray {
|
fn get_lints(&self) -> LintArray {
|
||||||
lint_array!(BLOCK_IN_IF_CONDITION_EXPR, BLOCK_IN_IF_CONDITION_STMT)
|
lint_array!(BLOCK_IN_IF_CONDITION_EXPR, BLOCK_IN_IF_CONDITION_STMT)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn name(&self) -> &'static str {
|
||||||
|
"BlockInIfCondition"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
struct ExVisitor<'a, 'tcx: 'a> {
|
struct ExVisitor<'a, 'tcx: 'a> {
|
||||||
|
|
|
@ -58,6 +58,10 @@ impl LintPass for NonminimalBool {
|
||||||
fn get_lints(&self) -> LintArray {
|
fn get_lints(&self) -> LintArray {
|
||||||
lint_array!(NONMINIMAL_BOOL, LOGIC_BUG)
|
lint_array!(NONMINIMAL_BOOL, LOGIC_BUG)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn name(&self) -> &'static str {
|
||||||
|
"NonminimalBool"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for NonminimalBool {
|
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for NonminimalBool {
|
||||||
|
|
|
@ -38,6 +38,10 @@ impl LintPass for ByteCount {
|
||||||
fn get_lints(&self) -> LintArray {
|
fn get_lints(&self) -> LintArray {
|
||||||
lint_array!(NAIVE_BYTECOUNT)
|
lint_array!(NAIVE_BYTECOUNT)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn name(&self) -> &'static str {
|
||||||
|
"ByteCount"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for ByteCount {
|
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for ByteCount {
|
||||||
|
|
|
@ -62,6 +62,10 @@ impl LintPass for Pass {
|
||||||
fn get_lints(&self) -> LintArray {
|
fn get_lints(&self) -> LintArray {
|
||||||
lint_array!(CARGO_COMMON_METADATA)
|
lint_array!(CARGO_COMMON_METADATA)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn name(&self) -> &'static str {
|
||||||
|
"CargoCommonMetadata"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl EarlyLintPass for Pass {
|
impl EarlyLintPass for Pass {
|
||||||
|
|
|
@ -78,6 +78,10 @@ impl LintPass for CollapsibleIf {
|
||||||
fn get_lints(&self) -> LintArray {
|
fn get_lints(&self) -> LintArray {
|
||||||
lint_array!(COLLAPSIBLE_IF)
|
lint_array!(COLLAPSIBLE_IF)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn name(&self) -> &'static str {
|
||||||
|
"CollapsibleIf"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl EarlyLintPass for CollapsibleIf {
|
impl EarlyLintPass for CollapsibleIf {
|
||||||
|
|
|
@ -32,6 +32,10 @@ impl LintPass for StaticConst {
|
||||||
fn get_lints(&self) -> LintArray {
|
fn get_lints(&self) -> LintArray {
|
||||||
lint_array!(CONST_STATIC_LIFETIME)
|
lint_array!(CONST_STATIC_LIFETIME)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn name(&self) -> &'static str {
|
||||||
|
"StaticConst"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl StaticConst {
|
impl StaticConst {
|
||||||
|
|
|
@ -110,6 +110,10 @@ impl LintPass for CopyAndPaste {
|
||||||
fn get_lints(&self) -> LintArray {
|
fn get_lints(&self) -> LintArray {
|
||||||
lint_array![IFS_SAME_COND, IF_SAME_THEN_ELSE, MATCH_SAME_ARMS]
|
lint_array![IFS_SAME_COND, IF_SAME_THEN_ELSE, MATCH_SAME_ARMS]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn name(&self) -> &'static str {
|
||||||
|
"CopyAndPaste"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for CopyAndPaste {
|
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for CopyAndPaste {
|
||||||
|
|
|
@ -35,6 +35,10 @@ impl LintPass for CopyIterator {
|
||||||
fn get_lints(&self) -> LintArray {
|
fn get_lints(&self) -> LintArray {
|
||||||
lint_array![COPY_ITERATOR]
|
lint_array![COPY_ITERATOR]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn name(&self) -> &'static str {
|
||||||
|
"CopyIterator"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for CopyIterator {
|
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for CopyIterator {
|
||||||
|
|
|
@ -42,6 +42,10 @@ impl LintPass for CyclomaticComplexity {
|
||||||
fn get_lints(&self) -> LintArray {
|
fn get_lints(&self) -> LintArray {
|
||||||
lint_array!(CYCLOMATIC_COMPLEXITY)
|
lint_array!(CYCLOMATIC_COMPLEXITY)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn name(&self) -> &'static str {
|
||||||
|
"CyclomaticComplexity"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl CyclomaticComplexity {
|
impl CyclomaticComplexity {
|
||||||
|
|
|
@ -35,6 +35,10 @@ impl LintPass for DefaultTraitAccess {
|
||||||
fn get_lints(&self) -> LintArray {
|
fn get_lints(&self) -> LintArray {
|
||||||
lint_array!(DEFAULT_TRAIT_ACCESS)
|
lint_array!(DEFAULT_TRAIT_ACCESS)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn name(&self) -> &'static str {
|
||||||
|
"DefaultTraitAccess"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for DefaultTraitAccess {
|
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for DefaultTraitAccess {
|
||||||
|
|
|
@ -68,6 +68,10 @@ impl LintPass for Derive {
|
||||||
fn get_lints(&self) -> LintArray {
|
fn get_lints(&self) -> LintArray {
|
||||||
lint_array!(EXPL_IMPL_CLONE_ON_COPY, DERIVE_HASH_XOR_EQ)
|
lint_array!(EXPL_IMPL_CLONE_ON_COPY, DERIVE_HASH_XOR_EQ)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn name(&self) -> &'static str {
|
||||||
|
"Derive"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Derive {
|
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Derive {
|
||||||
|
|
|
@ -48,6 +48,10 @@ impl LintPass for Doc {
|
||||||
fn get_lints(&self) -> LintArray {
|
fn get_lints(&self) -> LintArray {
|
||||||
lint_array![DOC_MARKDOWN]
|
lint_array![DOC_MARKDOWN]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn name(&self) -> &'static str {
|
||||||
|
"DocMarkdown"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl EarlyLintPass for Doc {
|
impl EarlyLintPass for Doc {
|
||||||
|
|
|
@ -37,6 +37,10 @@ impl LintPass for Pass {
|
||||||
fn get_lints(&self) -> LintArray {
|
fn get_lints(&self) -> LintArray {
|
||||||
lint_array!(DOUBLE_COMPARISONS)
|
lint_array!(DOUBLE_COMPARISONS)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn name(&self) -> &'static str {
|
||||||
|
"DoubleComparisons"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a, 'tcx> Pass {
|
impl<'a, 'tcx> Pass {
|
||||||
|
|
|
@ -29,6 +29,10 @@ impl LintPass for DoubleParens {
|
||||||
fn get_lints(&self) -> LintArray {
|
fn get_lints(&self) -> LintArray {
|
||||||
lint_array!(DOUBLE_PARENS)
|
lint_array!(DOUBLE_PARENS)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn name(&self) -> &'static str {
|
||||||
|
"DoubleParens"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl EarlyLintPass for DoubleParens {
|
impl EarlyLintPass for DoubleParens {
|
||||||
|
|
|
@ -112,6 +112,10 @@ impl LintPass for Pass {
|
||||||
fn get_lints(&self) -> LintArray {
|
fn get_lints(&self) -> LintArray {
|
||||||
lint_array!(DROP_REF, FORGET_REF, DROP_COPY, FORGET_COPY)
|
lint_array!(DROP_REF, FORGET_REF, DROP_COPY, FORGET_COPY)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn name(&self) -> &'static str {
|
||||||
|
"DropForgetRef"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Pass {
|
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Pass {
|
||||||
|
|
|
@ -36,6 +36,10 @@ impl LintPass for DurationSubsec {
|
||||||
fn get_lints(&self) -> LintArray {
|
fn get_lints(&self) -> LintArray {
|
||||||
lint_array!(DURATION_SUBSEC)
|
lint_array!(DURATION_SUBSEC)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn name(&self) -> &'static str {
|
||||||
|
"DurationSubsec"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for DurationSubsec {
|
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for DurationSubsec {
|
||||||
|
|
|
@ -46,6 +46,10 @@ impl LintPass for ElseIfWithoutElse {
|
||||||
fn get_lints(&self) -> LintArray {
|
fn get_lints(&self) -> LintArray {
|
||||||
lint_array!(ELSE_IF_WITHOUT_ELSE)
|
lint_array!(ELSE_IF_WITHOUT_ELSE)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn name(&self) -> &'static str {
|
||||||
|
"ElseIfWithoutElse"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl EarlyLintPass for ElseIfWithoutElse {
|
impl EarlyLintPass for ElseIfWithoutElse {
|
||||||
|
|
|
@ -30,6 +30,10 @@ impl LintPass for EmptyEnum {
|
||||||
fn get_lints(&self) -> LintArray {
|
fn get_lints(&self) -> LintArray {
|
||||||
lint_array!(EMPTY_ENUM)
|
lint_array!(EMPTY_ENUM)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn name(&self) -> &'static str {
|
||||||
|
"EmptyEnum"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for EmptyEnum {
|
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for EmptyEnum {
|
||||||
|
|
|
@ -44,6 +44,10 @@ impl LintPass for HashMapLint {
|
||||||
fn get_lints(&self) -> LintArray {
|
fn get_lints(&self) -> LintArray {
|
||||||
lint_array!(MAP_ENTRY)
|
lint_array!(MAP_ENTRY)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn name(&self) -> &'static str {
|
||||||
|
"HashMap"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for HashMapLint {
|
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for HashMapLint {
|
||||||
|
|
|
@ -40,6 +40,10 @@ impl LintPass for UnportableVariant {
|
||||||
fn get_lints(&self) -> LintArray {
|
fn get_lints(&self) -> LintArray {
|
||||||
lint_array!(ENUM_CLIKE_UNPORTABLE_VARIANT)
|
lint_array!(ENUM_CLIKE_UNPORTABLE_VARIANT)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn name(&self) -> &'static str {
|
||||||
|
"UnportableVariant"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for UnportableVariant {
|
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for UnportableVariant {
|
||||||
|
|
|
@ -32,6 +32,10 @@ impl LintPass for EnumGlobUse {
|
||||||
fn get_lints(&self) -> LintArray {
|
fn get_lints(&self) -> LintArray {
|
||||||
lint_array!(ENUM_GLOB_USE)
|
lint_array!(ENUM_GLOB_USE)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn name(&self) -> &'static str {
|
||||||
|
"EnumGlobUse"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for EnumGlobUse {
|
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for EnumGlobUse {
|
||||||
|
|
|
@ -124,6 +124,10 @@ impl LintPass for EnumVariantNames {
|
||||||
MODULE_INCEPTION
|
MODULE_INCEPTION
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn name(&self) -> &'static str {
|
||||||
|
"EnumVariantNames"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn var2str(var: &Variant) -> LocalInternedString {
|
fn var2str(var: &Variant) -> LocalInternedString {
|
||||||
|
|
|
@ -52,6 +52,10 @@ impl LintPass for EqOp {
|
||||||
fn get_lints(&self) -> LintArray {
|
fn get_lints(&self) -> LintArray {
|
||||||
lint_array!(EQ_OP, OP_REF)
|
lint_array!(EQ_OP, OP_REF)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn name(&self) -> &'static str {
|
||||||
|
"EqOp"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for EqOp {
|
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for EqOp {
|
||||||
|
|
|
@ -32,6 +32,10 @@ impl LintPass for ErasingOp {
|
||||||
fn get_lints(&self) -> LintArray {
|
fn get_lints(&self) -> LintArray {
|
||||||
lint_array!(ERASING_OP)
|
lint_array!(ERASING_OP)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn name(&self) -> &'static str {
|
||||||
|
"ErasingOp"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for ErasingOp {
|
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for ErasingOp {
|
||||||
|
|
|
@ -52,6 +52,10 @@ impl LintPass for Pass {
|
||||||
fn get_lints(&self) -> LintArray {
|
fn get_lints(&self) -> LintArray {
|
||||||
lint_array!(BOXED_LOCAL)
|
lint_array!(BOXED_LOCAL)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn name(&self) -> &'static str {
|
||||||
|
"BoxedLocal"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Pass {
|
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Pass {
|
||||||
|
|
|
@ -36,6 +36,10 @@ impl LintPass for EtaPass {
|
||||||
fn get_lints(&self) -> LintArray {
|
fn get_lints(&self) -> LintArray {
|
||||||
lint_array!(REDUNDANT_CLOSURE)
|
lint_array!(REDUNDANT_CLOSURE)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn name(&self) -> &'static str {
|
||||||
|
"EtaReduction"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for EtaPass {
|
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for EtaPass {
|
||||||
|
|
|
@ -61,6 +61,10 @@ impl LintPass for EvalOrderDependence {
|
||||||
fn get_lints(&self) -> LintArray {
|
fn get_lints(&self) -> LintArray {
|
||||||
lint_array!(EVAL_ORDER_DEPENDENCE, DIVERGING_SUB_EXPRESSION)
|
lint_array!(EVAL_ORDER_DEPENDENCE, DIVERGING_SUB_EXPRESSION)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn name(&self) -> &'static str {
|
||||||
|
"EvalOrderDependence"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for EvalOrderDependence {
|
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for EvalOrderDependence {
|
||||||
|
|
|
@ -41,6 +41,10 @@ impl LintPass for ExcessivePrecision {
|
||||||
fn get_lints(&self) -> LintArray {
|
fn get_lints(&self) -> LintArray {
|
||||||
lint_array!(EXCESSIVE_PRECISION)
|
lint_array!(EXCESSIVE_PRECISION)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn name(&self) -> &'static str {
|
||||||
|
"ExcessivePrecision"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for ExcessivePrecision {
|
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for ExcessivePrecision {
|
||||||
|
|
|
@ -31,6 +31,10 @@ impl LintPass for Pass {
|
||||||
fn get_lints(&self) -> LintArray {
|
fn get_lints(&self) -> LintArray {
|
||||||
lint_array!(EXPLICIT_WRITE)
|
lint_array!(EXPLICIT_WRITE)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn name(&self) -> &'static str {
|
||||||
|
"ExplicitWrite"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Pass {
|
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Pass {
|
||||||
|
|
|
@ -34,6 +34,10 @@ impl LintPass for FallibleImplFrom {
|
||||||
fn get_lints(&self) -> LintArray {
|
fn get_lints(&self) -> LintArray {
|
||||||
lint_array!(FALLIBLE_IMPL_FROM)
|
lint_array!(FALLIBLE_IMPL_FROM)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn name(&self) -> &'static str {
|
||||||
|
"FallibleImpleFrom"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for FallibleImplFrom {
|
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for FallibleImplFrom {
|
||||||
|
|
|
@ -40,6 +40,10 @@ impl LintPass for Pass {
|
||||||
fn get_lints(&self) -> LintArray {
|
fn get_lints(&self) -> LintArray {
|
||||||
lint_array![USELESS_FORMAT]
|
lint_array![USELESS_FORMAT]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn name(&self) -> &'static str {
|
||||||
|
"UselessFormat"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Pass {
|
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Pass {
|
||||||
|
|
|
@ -89,6 +89,10 @@ impl LintPass for Formatting {
|
||||||
POSSIBLE_MISSING_COMMA
|
POSSIBLE_MISSING_COMMA
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn name(&self) -> &'static str {
|
||||||
|
"Formatting"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl EarlyLintPass for Formatting {
|
impl EarlyLintPass for Formatting {
|
||||||
|
|
|
@ -74,6 +74,10 @@ impl LintPass for Functions {
|
||||||
fn get_lints(&self) -> LintArray {
|
fn get_lints(&self) -> LintArray {
|
||||||
lint_array!(TOO_MANY_ARGUMENTS, NOT_UNSAFE_PTR_ARG_DEREF)
|
lint_array!(TOO_MANY_ARGUMENTS, NOT_UNSAFE_PTR_ARG_DEREF)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn name(&self) -> &'static str {
|
||||||
|
"Functions"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Functions {
|
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Functions {
|
||||||
|
|
|
@ -34,6 +34,10 @@ impl LintPass for IdentityConversion {
|
||||||
fn get_lints(&self) -> LintArray {
|
fn get_lints(&self) -> LintArray {
|
||||||
lint_array!(IDENTITY_CONVERSION)
|
lint_array!(IDENTITY_CONVERSION)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn name(&self) -> &'static str {
|
||||||
|
"IdentityConversion"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for IdentityConversion {
|
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for IdentityConversion {
|
||||||
|
|
|
@ -30,6 +30,10 @@ impl LintPass for IdentityOp {
|
||||||
fn get_lints(&self) -> LintArray {
|
fn get_lints(&self) -> LintArray {
|
||||||
lint_array!(IDENTITY_OP)
|
lint_array!(IDENTITY_OP)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn name(&self) -> &'static str {
|
||||||
|
"IdentityOp"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for IdentityOp {
|
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for IdentityOp {
|
||||||
|
|
|
@ -44,6 +44,10 @@ impl LintPass for IfNotElse {
|
||||||
fn get_lints(&self) -> LintArray {
|
fn get_lints(&self) -> LintArray {
|
||||||
lint_array!(IF_NOT_ELSE)
|
lint_array!(IF_NOT_ELSE)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn name(&self) -> &'static str {
|
||||||
|
"IfNotElse"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl EarlyLintPass for IfNotElse {
|
impl EarlyLintPass for IfNotElse {
|
||||||
|
|
|
@ -114,6 +114,10 @@ impl LintPass for Pass {
|
||||||
fn get_lints(&self) -> LintArray {
|
fn get_lints(&self) -> LintArray {
|
||||||
lint_array!(IMPLICIT_RETURN)
|
lint_array!(IMPLICIT_RETURN)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn name(&self) -> &'static str {
|
||||||
|
"ImplicitReturn"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Pass {
|
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Pass {
|
||||||
|
|
|
@ -91,6 +91,10 @@ impl LintPass for IndexingSlicing {
|
||||||
fn get_lints(&self) -> LintArray {
|
fn get_lints(&self) -> LintArray {
|
||||||
lint_array!(INDEXING_SLICING, OUT_OF_BOUNDS_INDEXING)
|
lint_array!(INDEXING_SLICING, OUT_OF_BOUNDS_INDEXING)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn name(&self) -> &'static str {
|
||||||
|
"IndexSlicing"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for IndexingSlicing {
|
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for IndexingSlicing {
|
||||||
|
|
|
@ -47,6 +47,10 @@ impl LintPass for Pass {
|
||||||
fn get_lints(&self) -> LintArray {
|
fn get_lints(&self) -> LintArray {
|
||||||
lint_array!(INFALLIBLE_DESTRUCTURING_MATCH)
|
lint_array!(INFALLIBLE_DESTRUCTURING_MATCH)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn name(&self) -> &'static str {
|
||||||
|
"InfallibleDestructingMatch"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Pass {
|
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Pass {
|
||||||
|
|
|
@ -45,6 +45,10 @@ impl LintPass for Pass {
|
||||||
fn get_lints(&self) -> LintArray {
|
fn get_lints(&self) -> LintArray {
|
||||||
lint_array!(INFINITE_ITER, MAYBE_INFINITE_ITER)
|
lint_array!(INFINITE_ITER, MAYBE_INFINITE_ITER)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn name(&self) -> &'static str {
|
||||||
|
"InfiniteIter"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Pass {
|
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Pass {
|
||||||
|
|
|
@ -56,6 +56,10 @@ impl LintPass for Pass {
|
||||||
fn get_lints(&self) -> LintArray {
|
fn get_lints(&self) -> LintArray {
|
||||||
lint_array!(MULTIPLE_INHERENT_IMPL)
|
lint_array!(MULTIPLE_INHERENT_IMPL)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn name(&self) -> &'static str {
|
||||||
|
"MultipleInherientImpl"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Pass {
|
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Pass {
|
||||||
|
|
|
@ -35,6 +35,10 @@ impl LintPass for Pass {
|
||||||
fn get_lints(&self) -> LintArray {
|
fn get_lints(&self) -> LintArray {
|
||||||
lint_array!(INLINE_FN_WITHOUT_BODY)
|
lint_array!(INLINE_FN_WITHOUT_BODY)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn name(&self) -> &'static str {
|
||||||
|
"InlineFnWithoutBody"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Pass {
|
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Pass {
|
||||||
|
|
|
@ -36,6 +36,10 @@ impl LintPass for IntPlusOne {
|
||||||
fn get_lints(&self) -> LintArray {
|
fn get_lints(&self) -> LintArray {
|
||||||
lint_array!(INT_PLUS_ONE)
|
lint_array!(INT_PLUS_ONE)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn name(&self) -> &'static str {
|
||||||
|
"IntPlusOne"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// cases:
|
// cases:
|
||||||
|
|
|
@ -32,6 +32,10 @@ impl LintPass for InvalidRef {
|
||||||
fn get_lints(&self) -> LintArray {
|
fn get_lints(&self) -> LintArray {
|
||||||
lint_array!(INVALID_REF)
|
lint_array!(INVALID_REF)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn name(&self) -> &'static str {
|
||||||
|
"InvalidRef"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for InvalidRef {
|
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for InvalidRef {
|
||||||
|
|
|
@ -40,6 +40,10 @@ impl LintPass for ItemsAfterStatements {
|
||||||
fn get_lints(&self) -> LintArray {
|
fn get_lints(&self) -> LintArray {
|
||||||
lint_array!(ITEMS_AFTER_STATEMENTS)
|
lint_array!(ITEMS_AFTER_STATEMENTS)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn name(&self) -> &'static str {
|
||||||
|
"ItemsAfterStatements"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl EarlyLintPass for ItemsAfterStatements {
|
impl EarlyLintPass for ItemsAfterStatements {
|
||||||
|
|
|
@ -46,6 +46,10 @@ impl LintPass for LargeEnumVariant {
|
||||||
fn get_lints(&self) -> LintArray {
|
fn get_lints(&self) -> LintArray {
|
||||||
lint_array!(LARGE_ENUM_VARIANT)
|
lint_array!(LARGE_ENUM_VARIANT)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn name(&self) -> &'static str {
|
||||||
|
"LargeEnumVariant"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for LargeEnumVariant {
|
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for LargeEnumVariant {
|
||||||
|
|
|
@ -77,6 +77,10 @@ impl LintPass for LenZero {
|
||||||
fn get_lints(&self) -> LintArray {
|
fn get_lints(&self) -> LintArray {
|
||||||
lint_array!(LEN_ZERO, LEN_WITHOUT_IS_EMPTY)
|
lint_array!(LEN_ZERO, LEN_WITHOUT_IS_EMPTY)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn name(&self) -> &'static str {
|
||||||
|
"LenZero"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for LenZero {
|
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for LenZero {
|
||||||
|
|
|
@ -60,6 +60,10 @@ impl LintPass for LetIfSeq {
|
||||||
fn get_lints(&self) -> LintArray {
|
fn get_lints(&self) -> LintArray {
|
||||||
lint_array!(USELESS_LET_IF_SEQ)
|
lint_array!(USELESS_LET_IF_SEQ)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn name(&self) -> &'static str {
|
||||||
|
"LetIfSeq"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for LetIfSeq {
|
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for LetIfSeq {
|
||||||
|
|
|
@ -212,15 +212,22 @@ pub fn register_pre_expansion_lints(
|
||||||
store: &mut rustc::lint::LintStore,
|
store: &mut rustc::lint::LintStore,
|
||||||
conf: &Conf,
|
conf: &Conf,
|
||||||
) {
|
) {
|
||||||
store.register_pre_expansion_pass(Some(session), box write::Pass);
|
store.register_pre_expansion_pass(Some(session), true, false, box write::Pass);
|
||||||
store.register_pre_expansion_pass(Some(session), box redundant_field_names::RedundantFieldNames);
|
|
||||||
store.register_pre_expansion_pass(
|
store.register_pre_expansion_pass(
|
||||||
Some(session),
|
Some(session),
|
||||||
|
true,
|
||||||
|
false,
|
||||||
|
box redundant_field_names::RedundantFieldNames,
|
||||||
|
);
|
||||||
|
store.register_pre_expansion_pass(
|
||||||
|
Some(session),
|
||||||
|
true,
|
||||||
|
false,
|
||||||
box non_expressive_names::NonExpressiveNames {
|
box non_expressive_names::NonExpressiveNames {
|
||||||
single_char_binding_names_threshold: conf.single_char_binding_names_threshold,
|
single_char_binding_names_threshold: conf.single_char_binding_names_threshold,
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
store.register_pre_expansion_pass(Some(session), box attrs::CfgAttrPass);
|
store.register_pre_expansion_pass(Some(session), true, false, box attrs::CfgAttrPass);
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn read_conf(reg: &rustc_plugin::Registry<'_>) -> Conf {
|
pub fn read_conf(reg: &rustc_plugin::Registry<'_>) -> Conf {
|
||||||
|
|
|
@ -61,6 +61,10 @@ impl LintPass for LifetimePass {
|
||||||
fn get_lints(&self) -> LintArray {
|
fn get_lints(&self) -> LintArray {
|
||||||
lint_array!(NEEDLESS_LIFETIMES, EXTRA_UNUSED_LIFETIMES)
|
lint_array!(NEEDLESS_LIFETIMES, EXTRA_UNUSED_LIFETIMES)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn name(&self) -> &'static str {
|
||||||
|
"LifeTimes"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for LifetimePass {
|
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for LifetimePass {
|
||||||
|
|
|
@ -346,6 +346,10 @@ impl LintPass for LiteralDigitGrouping {
|
||||||
MISTYPED_LITERAL_SUFFIXES,
|
MISTYPED_LITERAL_SUFFIXES,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn name(&self) -> &'static str {
|
||||||
|
"LiteralDigitGrouping"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl EarlyLintPass for LiteralDigitGrouping {
|
impl EarlyLintPass for LiteralDigitGrouping {
|
||||||
|
@ -493,6 +497,10 @@ impl LintPass for LiteralRepresentation {
|
||||||
fn get_lints(&self) -> LintArray {
|
fn get_lints(&self) -> LintArray {
|
||||||
lint_array!(DECIMAL_LITERAL_REPRESENTATION)
|
lint_array!(DECIMAL_LITERAL_REPRESENTATION)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn name(&self) -> &'static str {
|
||||||
|
"DecimalLiteralRepresentation"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl EarlyLintPass for LiteralRepresentation {
|
impl EarlyLintPass for LiteralRepresentation {
|
||||||
|
|
|
@ -465,6 +465,10 @@ impl LintPass for Pass {
|
||||||
WHILE_IMMUTABLE_CONDITION,
|
WHILE_IMMUTABLE_CONDITION,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn name(&self) -> &'static str {
|
||||||
|
"Loops"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Pass {
|
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Pass {
|
||||||
|
|
|
@ -46,6 +46,10 @@ impl LintPass for Pass {
|
||||||
fn get_lints(&self) -> LintArray {
|
fn get_lints(&self) -> LintArray {
|
||||||
lint_array!(MAP_CLONE)
|
lint_array!(MAP_CLONE)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn name(&self) -> &'static str {
|
||||||
|
"MapClone"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Pass {
|
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Pass {
|
||||||
|
|
|
@ -81,6 +81,10 @@ impl LintPass for Pass {
|
||||||
fn get_lints(&self) -> LintArray {
|
fn get_lints(&self) -> LintArray {
|
||||||
lint_array!(OPTION_MAP_UNIT_FN, RESULT_MAP_UNIT_FN)
|
lint_array!(OPTION_MAP_UNIT_FN, RESULT_MAP_UNIT_FN)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn name(&self) -> &'static str {
|
||||||
|
"MapUnit"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn is_unit_type(ty: ty::Ty<'_>) -> bool {
|
fn is_unit_type(ty: ty::Ty<'_>) -> bool {
|
||||||
|
|
|
@ -202,6 +202,10 @@ impl LintPass for MatchPass {
|
||||||
MATCH_AS_REF
|
MATCH_AS_REF
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn name(&self) -> &'static str {
|
||||||
|
"Matches"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for MatchPass {
|
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for MatchPass {
|
||||||
|
|
|
@ -31,6 +31,10 @@ impl LintPass for MemDiscriminant {
|
||||||
fn get_lints(&self) -> LintArray {
|
fn get_lints(&self) -> LintArray {
|
||||||
lint_array![MEM_DISCRIMINANT_NON_ENUM]
|
lint_array![MEM_DISCRIMINANT_NON_ENUM]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn name(&self) -> &'static str {
|
||||||
|
"MemDiscriminant"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for MemDiscriminant {
|
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for MemDiscriminant {
|
||||||
|
|
|
@ -27,6 +27,10 @@ impl LintPass for MemForget {
|
||||||
fn get_lints(&self) -> LintArray {
|
fn get_lints(&self) -> LintArray {
|
||||||
lint_array![MEM_FORGET]
|
lint_array![MEM_FORGET]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn name(&self) -> &'static str {
|
||||||
|
"MemForget"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for MemForget {
|
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for MemForget {
|
||||||
|
|
|
@ -36,6 +36,10 @@ impl LintPass for MemReplace {
|
||||||
fn get_lints(&self) -> LintArray {
|
fn get_lints(&self) -> LintArray {
|
||||||
lint_array![MEM_REPLACE_OPTION_WITH_NONE]
|
lint_array![MEM_REPLACE_OPTION_WITH_NONE]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn name(&self) -> &'static str {
|
||||||
|
"MemReplace"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for MemReplace {
|
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for MemReplace {
|
||||||
|
|
|
@ -814,6 +814,10 @@ impl LintPass for Pass {
|
||||||
INTO_ITER_ON_REF,
|
INTO_ITER_ON_REF,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn name(&self) -> &'static str {
|
||||||
|
"Methods"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Pass {
|
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Pass {
|
||||||
|
|
|
@ -31,6 +31,10 @@ impl LintPass for MinMaxPass {
|
||||||
fn get_lints(&self) -> LintArray {
|
fn get_lints(&self) -> LintArray {
|
||||||
lint_array!(MIN_MAX)
|
lint_array!(MIN_MAX)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn name(&self) -> &'static str {
|
||||||
|
"MinMax"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for MinMaxPass {
|
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for MinMaxPass {
|
||||||
|
|
|
@ -242,6 +242,10 @@ impl LintPass for Pass {
|
||||||
FLOAT_CMP_CONST
|
FLOAT_CMP_CONST
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn name(&self) -> &'static str {
|
||||||
|
"MiscLints"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Pass {
|
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Pass {
|
||||||
|
|
|
@ -187,6 +187,10 @@ impl LintPass for MiscEarly {
|
||||||
BUILTIN_TYPE_SHADOW
|
BUILTIN_TYPE_SHADOW
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn name(&self) -> &'static str {
|
||||||
|
"MiscEarlyLints"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Used to find `return` statements or equivalents e.g. `?`
|
// Used to find `return` statements or equivalents e.g. `?`
|
||||||
|
|
|
@ -90,6 +90,10 @@ impl LintPass for MissingDoc {
|
||||||
fn get_lints(&self) -> LintArray {
|
fn get_lints(&self) -> LintArray {
|
||||||
lint_array![MISSING_DOCS_IN_PRIVATE_ITEMS]
|
lint_array![MISSING_DOCS_IN_PRIVATE_ITEMS]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn name(&self) -> &'static str {
|
||||||
|
"MissingDoc"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for MissingDoc {
|
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for MissingDoc {
|
||||||
|
|
|
@ -83,6 +83,10 @@ impl LintPass for MissingInline {
|
||||||
fn get_lints(&self) -> LintArray {
|
fn get_lints(&self) -> LintArray {
|
||||||
lint_array![MISSING_INLINE_IN_PUBLIC_ITEMS]
|
lint_array![MISSING_INLINE_IN_PUBLIC_ITEMS]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn name(&self) -> &'static str {
|
||||||
|
"MissingInline"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for MissingInline {
|
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for MissingInline {
|
||||||
|
|
|
@ -37,6 +37,10 @@ impl LintPass for Pass {
|
||||||
fn get_lints(&self) -> LintArray {
|
fn get_lints(&self) -> LintArray {
|
||||||
lint_array!(MULTIPLE_CRATE_VERSIONS)
|
lint_array!(MULTIPLE_CRATE_VERSIONS)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn name(&self) -> &'static str {
|
||||||
|
"MultipleCrateVersions"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl EarlyLintPass for Pass {
|
impl EarlyLintPass for Pass {
|
||||||
|
|
|
@ -30,6 +30,10 @@ impl LintPass for MutMut {
|
||||||
fn get_lints(&self) -> LintArray {
|
fn get_lints(&self) -> LintArray {
|
||||||
lint_array!(MUT_MUT)
|
lint_array!(MUT_MUT)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn name(&self) -> &'static str {
|
||||||
|
"MutMut"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for MutMut {
|
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for MutMut {
|
||||||
|
|
|
@ -30,6 +30,10 @@ impl LintPass for UnnecessaryMutPassed {
|
||||||
fn get_lints(&self) -> LintArray {
|
fn get_lints(&self) -> LintArray {
|
||||||
lint_array!(UNNECESSARY_MUT_PASSED)
|
lint_array!(UNNECESSARY_MUT_PASSED)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn name(&self) -> &'static str {
|
||||||
|
"UnneccessaryMutPassed"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for UnnecessaryMutPassed {
|
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for UnnecessaryMutPassed {
|
||||||
|
|
|
@ -53,6 +53,10 @@ impl LintPass for MutexAtomic {
|
||||||
fn get_lints(&self) -> LintArray {
|
fn get_lints(&self) -> LintArray {
|
||||||
lint_array!(MUTEX_ATOMIC, MUTEX_INTEGER)
|
lint_array!(MUTEX_ATOMIC, MUTEX_INTEGER)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn name(&self) -> &'static str {
|
||||||
|
"Mutex"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub struct MutexAtomic;
|
pub struct MutexAtomic;
|
||||||
|
|
|
@ -61,6 +61,10 @@ impl LintPass for NeedlessBool {
|
||||||
fn get_lints(&self) -> LintArray {
|
fn get_lints(&self) -> LintArray {
|
||||||
lint_array!(NEEDLESS_BOOL)
|
lint_array!(NEEDLESS_BOOL)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn name(&self) -> &'static str {
|
||||||
|
"NeedlessBool"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for NeedlessBool {
|
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for NeedlessBool {
|
||||||
|
@ -141,6 +145,10 @@ impl LintPass for BoolComparison {
|
||||||
fn get_lints(&self) -> LintArray {
|
fn get_lints(&self) -> LintArray {
|
||||||
lint_array!(BOOL_COMPARISON)
|
lint_array!(BOOL_COMPARISON)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn name(&self) -> &'static str {
|
||||||
|
"BoolComparison"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for BoolComparison {
|
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for BoolComparison {
|
||||||
|
|
|
@ -39,6 +39,10 @@ impl LintPass for NeedlessBorrow {
|
||||||
fn get_lints(&self) -> LintArray {
|
fn get_lints(&self) -> LintArray {
|
||||||
lint_array!(NEEDLESS_BORROW)
|
lint_array!(NEEDLESS_BORROW)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn name(&self) -> &'static str {
|
||||||
|
"NeedlessBorrow"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for NeedlessBorrow {
|
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for NeedlessBorrow {
|
||||||
|
|
|
@ -58,6 +58,10 @@ impl LintPass for NeedlessBorrowedRef {
|
||||||
fn get_lints(&self) -> LintArray {
|
fn get_lints(&self) -> LintArray {
|
||||||
lint_array!(NEEDLESS_BORROWED_REFERENCE)
|
lint_array!(NEEDLESS_BORROWED_REFERENCE)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn name(&self) -> &'static str {
|
||||||
|
"NeedlessBorrowedRef"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for NeedlessBorrowedRef {
|
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for NeedlessBorrowedRef {
|
||||||
|
|
|
@ -107,6 +107,10 @@ impl LintPass for NeedlessContinue {
|
||||||
fn get_lints(&self) -> LintArray {
|
fn get_lints(&self) -> LintArray {
|
||||||
lint_array!(NEEDLESS_CONTINUE)
|
lint_array!(NEEDLESS_CONTINUE)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn name(&self) -> &'static str {
|
||||||
|
"NeedlessContinue"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl EarlyLintPass for NeedlessContinue {
|
impl EarlyLintPass for NeedlessContinue {
|
||||||
|
|
|
@ -56,6 +56,10 @@ impl LintPass for NeedlessPassByValue {
|
||||||
fn get_lints(&self) -> LintArray {
|
fn get_lints(&self) -> LintArray {
|
||||||
lint_array![NEEDLESS_PASS_BY_VALUE]
|
lint_array![NEEDLESS_PASS_BY_VALUE]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn name(&self) -> &'static str {
|
||||||
|
"NeedlessPassByValue"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
macro_rules! need {
|
macro_rules! need {
|
||||||
|
|
|
@ -33,6 +33,10 @@ impl LintPass for Pass {
|
||||||
fn get_lints(&self) -> LintArray {
|
fn get_lints(&self) -> LintArray {
|
||||||
lint_array!(NEEDLESS_UPDATE)
|
lint_array!(NEEDLESS_UPDATE)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn name(&self) -> &'static str {
|
||||||
|
"NeedUpdate"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Pass {
|
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Pass {
|
||||||
|
|
|
@ -48,6 +48,10 @@ impl LintPass for NoNegCompOpForPartialOrd {
|
||||||
fn get_lints(&self) -> LintArray {
|
fn get_lints(&self) -> LintArray {
|
||||||
lint_array!(NEG_CMP_OP_ON_PARTIAL_ORD)
|
lint_array!(NEG_CMP_OP_ON_PARTIAL_ORD)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn name(&self) -> &'static str {
|
||||||
|
"NoNegCompOpForPartialOrd"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for NoNegCompOpForPartialOrd {
|
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for NoNegCompOpForPartialOrd {
|
||||||
|
|
|
@ -30,6 +30,10 @@ impl LintPass for NegMultiply {
|
||||||
fn get_lints(&self) -> LintArray {
|
fn get_lints(&self) -> LintArray {
|
||||||
lint_array!(NEG_MULTIPLY)
|
lint_array!(NEG_MULTIPLY)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn name(&self) -> &'static str {
|
||||||
|
"NegMultiply"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(clippy::match_same_arms)]
|
#[allow(clippy::match_same_arms)]
|
||||||
|
|
|
@ -93,6 +93,10 @@ impl LintPass for NewWithoutDefault {
|
||||||
fn get_lints(&self) -> LintArray {
|
fn get_lints(&self) -> LintArray {
|
||||||
lint_array!(NEW_WITHOUT_DEFAULT)
|
lint_array!(NEW_WITHOUT_DEFAULT)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn name(&self) -> &'static str {
|
||||||
|
"NewWithoutDefault"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for NewWithoutDefault {
|
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for NewWithoutDefault {
|
||||||
|
|
|
@ -100,6 +100,10 @@ impl LintPass for Pass {
|
||||||
fn get_lints(&self) -> LintArray {
|
fn get_lints(&self) -> LintArray {
|
||||||
lint_array!(NO_EFFECT, UNNECESSARY_OPERATION)
|
lint_array!(NO_EFFECT, UNNECESSARY_OPERATION)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn name(&self) -> &'static str {
|
||||||
|
"NoEffect"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Pass {
|
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Pass {
|
||||||
|
|
|
@ -147,6 +147,10 @@ impl LintPass for NonCopyConst {
|
||||||
fn get_lints(&self) -> LintArray {
|
fn get_lints(&self) -> LintArray {
|
||||||
lint_array!(DECLARE_INTERIOR_MUTABLE_CONST, BORROW_INTERIOR_MUTABLE_CONST)
|
lint_array!(DECLARE_INTERIOR_MUTABLE_CONST, BORROW_INTERIOR_MUTABLE_CONST)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn name(&self) -> &'static str {
|
||||||
|
"NonCopyConst"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for NonCopyConst {
|
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for NonCopyConst {
|
||||||
|
|
|
@ -71,6 +71,10 @@ impl LintPass for NonExpressiveNames {
|
||||||
fn get_lints(&self) -> LintArray {
|
fn get_lints(&self) -> LintArray {
|
||||||
lint_array!(SIMILAR_NAMES, MANY_SINGLE_CHAR_NAMES, JUST_UNDERSCORES_AND_DIGITS)
|
lint_array!(SIMILAR_NAMES, MANY_SINGLE_CHAR_NAMES, JUST_UNDERSCORES_AND_DIGITS)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn name(&self) -> &'static str {
|
||||||
|
"NoneExpressiveNames"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
struct ExistingName {
|
struct ExistingName {
|
||||||
|
|
|
@ -41,6 +41,10 @@ impl LintPass for Pass {
|
||||||
fn get_lints(&self) -> LintArray {
|
fn get_lints(&self) -> LintArray {
|
||||||
lint_array!(IF_LET_SOME_RESULT)
|
lint_array!(IF_LET_SOME_RESULT)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn name(&self) -> &'static str {
|
||||||
|
"OkIfLet"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Pass {
|
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Pass {
|
||||||
|
|
|
@ -30,6 +30,10 @@ impl LintPass for NonSensical {
|
||||||
fn get_lints(&self) -> LintArray {
|
fn get_lints(&self) -> LintArray {
|
||||||
lint_array!(NONSENSICAL_OPEN_OPTIONS)
|
lint_array!(NONSENSICAL_OPEN_OPTIONS)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn name(&self) -> &'static str {
|
||||||
|
"OpenOptions"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for NonSensical {
|
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for NonSensical {
|
||||||
|
|
|
@ -28,6 +28,10 @@ impl LintPass for OverflowCheckConditional {
|
||||||
fn get_lints(&self) -> LintArray {
|
fn get_lints(&self) -> LintArray {
|
||||||
lint_array!(OVERFLOW_CHECK_CONDITIONAL)
|
lint_array!(OVERFLOW_CHECK_CONDITIONAL)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn name(&self) -> &'static str {
|
||||||
|
"OverflowCheckConditional"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for OverflowCheckConditional {
|
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for OverflowCheckConditional {
|
||||||
|
|
|
@ -48,6 +48,10 @@ impl LintPass for Pass {
|
||||||
fn get_lints(&self) -> LintArray {
|
fn get_lints(&self) -> LintArray {
|
||||||
lint_array!(PANIC_PARAMS, UNIMPLEMENTED)
|
lint_array!(PANIC_PARAMS, UNIMPLEMENTED)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn name(&self) -> &'static str {
|
||||||
|
"PanicUnimplemented"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Pass {
|
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Pass {
|
||||||
|
|
|
@ -35,6 +35,10 @@ impl LintPass for Pass {
|
||||||
fn get_lints(&self) -> LintArray {
|
fn get_lints(&self) -> LintArray {
|
||||||
lint_array!(PARTIALEQ_NE_IMPL)
|
lint_array!(PARTIALEQ_NE_IMPL)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn name(&self) -> &'static str {
|
||||||
|
"PartialEqNeImpl"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Pass {
|
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Pass {
|
||||||
|
|
|
@ -35,6 +35,10 @@ impl LintPass for Precedence {
|
||||||
fn get_lints(&self) -> LintArray {
|
fn get_lints(&self) -> LintArray {
|
||||||
lint_array!(PRECEDENCE)
|
lint_array!(PRECEDENCE)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn name(&self) -> &'static str {
|
||||||
|
"Precedence"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl EarlyLintPass for Precedence {
|
impl EarlyLintPass for Precedence {
|
||||||
|
|
|
@ -102,6 +102,10 @@ impl LintPass for PointerPass {
|
||||||
fn get_lints(&self) -> LintArray {
|
fn get_lints(&self) -> LintArray {
|
||||||
lint_array!(PTR_ARG, CMP_NULL, MUT_FROM_REF)
|
lint_array!(PTR_ARG, CMP_NULL, MUT_FROM_REF)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn name(&self) -> &'static str {
|
||||||
|
"Ptr"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for PointerPass {
|
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for PointerPass {
|
||||||
|
|
|
@ -46,6 +46,10 @@ impl lint::LintPass for Pass {
|
||||||
fn get_lints(&self) -> lint::LintArray {
|
fn get_lints(&self) -> lint::LintArray {
|
||||||
lint_array!(PTR_OFFSET_WITH_CAST)
|
lint_array!(PTR_OFFSET_WITH_CAST)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn name(&self) -> &'static str {
|
||||||
|
"PtrOffsetWithCast"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a, 'tcx> lint::LateLintPass<'a, 'tcx> for Pass {
|
impl<'a, 'tcx> lint::LateLintPass<'a, 'tcx> for Pass {
|
||||||
|
|
|
@ -41,6 +41,10 @@ impl LintPass for Pass {
|
||||||
fn get_lints(&self) -> LintArray {
|
fn get_lints(&self) -> LintArray {
|
||||||
lint_array!(QUESTION_MARK)
|
lint_array!(QUESTION_MARK)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn name(&self) -> &'static str {
|
||||||
|
"QuestionMark"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Pass {
|
impl Pass {
|
||||||
|
|
|
@ -97,6 +97,10 @@ impl LintPass for Pass {
|
||||||
RANGE_MINUS_ONE
|
RANGE_MINUS_ONE
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn name(&self) -> &'static str {
|
||||||
|
"Ranges"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Pass {
|
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Pass {
|
||||||
|
|
|
@ -73,6 +73,10 @@ impl LintPass for RedundantClone {
|
||||||
fn get_lints(&self) -> LintArray {
|
fn get_lints(&self) -> LintArray {
|
||||||
lint_array!(REDUNDANT_CLONE)
|
lint_array!(REDUNDANT_CLONE)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn name(&self) -> &'static str {
|
||||||
|
"RedundantClone"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for RedundantClone {
|
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for RedundantClone {
|
||||||
|
|
|
@ -38,6 +38,10 @@ impl LintPass for RedundantFieldNames {
|
||||||
fn get_lints(&self) -> LintArray {
|
fn get_lints(&self) -> LintArray {
|
||||||
lint_array!(REDUNDANT_FIELD_NAMES)
|
lint_array!(REDUNDANT_FIELD_NAMES)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn name(&self) -> &'static str {
|
||||||
|
"RedundantFieldNames"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl EarlyLintPass for RedundantFieldNames {
|
impl EarlyLintPass for RedundantFieldNames {
|
||||||
|
|
|
@ -49,6 +49,10 @@ impl LintPass for Pass {
|
||||||
fn get_lints(&self) -> LintArray {
|
fn get_lints(&self) -> LintArray {
|
||||||
lint_array!(REDUNDANT_PATTERN_MATCHING)
|
lint_array!(REDUNDANT_PATTERN_MATCHING)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn name(&self) -> &'static str {
|
||||||
|
"RedundantPatternMatching"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Pass {
|
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Pass {
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue