mirror of
https://github.com/rust-lang/rust-clippy
synced 2025-02-17 06:28:42 +00:00
neg-multiply: make lint adhere to lint message convention
This commit is contained in:
parent
e519bb3c85
commit
178da9b2ef
2 changed files with 3 additions and 3 deletions
|
@ -47,7 +47,7 @@ fn check_mul(cx: &LateContext<'_>, span: Span, lit: &Expr<'_>, exp: &Expr<'_>) {
|
|||
if let Constant::Int(1) = consts::lit_to_constant(&l.node, cx.typeck_results().expr_ty_opt(lit));
|
||||
if cx.typeck_results().expr_ty(exp).is_integral();
|
||||
then {
|
||||
span_lint(cx, NEG_MULTIPLY, span, "Negation by multiplying with `-1`");
|
||||
span_lint(cx, NEG_MULTIPLY, span, "negation by multiplying with `-1`");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
error: Negation by multiplying with `-1`
|
||||
error: negation by multiplying with `-1`
|
||||
--> $DIR/neg_multiply.rs:27:5
|
||||
|
|
||||
LL | x * -1;
|
||||
|
@ -6,7 +6,7 @@ LL | x * -1;
|
|||
|
|
||||
= note: `-D clippy::neg-multiply` implied by `-D warnings`
|
||||
|
||||
error: Negation by multiplying with `-1`
|
||||
error: negation by multiplying with `-1`
|
||||
--> $DIR/neg_multiply.rs:29:5
|
||||
|
|
||||
LL | -1 * x;
|
||||
|
|
Loading…
Add table
Reference in a new issue