suspicious-arithmetic-impl: make lint adhere to lint message convention
This commit is contained in:
parent
7954c22a99
commit
fe37ddbd11
@ -98,7 +98,7 @@ impl<'tcx> LateLintPass<'tcx> for SuspiciousImpl {
|
||||
cx,
|
||||
SUSPICIOUS_ARITHMETIC_IMPL,
|
||||
binop.span,
|
||||
&format!(r#"Suspicious use of binary operator in `{}` impl"#, impl_trait),
|
||||
&format!("suspicious use of binary operator in `{}` impl", impl_trait),
|
||||
);
|
||||
}
|
||||
|
||||
@ -135,7 +135,7 @@ impl<'tcx> LateLintPass<'tcx> for SuspiciousImpl {
|
||||
cx,
|
||||
SUSPICIOUS_OP_ASSIGN_IMPL,
|
||||
binop.span,
|
||||
&format!(r#"Suspicious use of binary operator in `{}` impl"#, impl_trait),
|
||||
&format!("suspicious use of binary operator in `{}` impl", impl_trait),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
error: Suspicious use of binary operator in `Add` impl
|
||||
error: suspicious use of binary operator in `Add` impl
|
||||
--> $DIR/suspicious_arithmetic_impl.rs:11:20
|
||||
|
|
||||
LL | Foo(self.0 - other.0)
|
||||
@ -6,7 +6,7 @@ LL | Foo(self.0 - other.0)
|
||||
|
|
||||
= note: `-D clippy::suspicious-arithmetic-impl` implied by `-D warnings`
|
||||
|
||||
error: Suspicious use of binary operator in `AddAssign` impl
|
||||
error: suspicious use of binary operator in `AddAssign` impl
|
||||
--> $DIR/suspicious_arithmetic_impl.rs:17:23
|
||||
|
|
||||
LL | *self = *self - other;
|
||||
@ -14,7 +14,7 @@ LL | *self = *self - other;
|
||||
|
|
||||
= note: `#[deny(clippy::suspicious_op_assign_impl)]` on by default
|
||||
|
||||
error: Suspicious use of binary operator in `MulAssign` impl
|
||||
error: suspicious use of binary operator in `MulAssign` impl
|
||||
--> $DIR/suspicious_arithmetic_impl.rs:30:16
|
||||
|
|
||||
LL | self.0 /= other.0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user