Skip to content

Commit 178da9b

Browse files
committed
neg-multiply: make lint adhere to lint message convention
1 parent e519bb3 commit 178da9b

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

clippy_lints/src/neg_multiply.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ fn check_mul(cx: &LateContext<'_>, span: Span, lit: &Expr<'_>, exp: &Expr<'_>) {
4747
if let Constant::Int(1) = consts::lit_to_constant(&l.node, cx.typeck_results().expr_ty_opt(lit));
4848
if cx.typeck_results().expr_ty(exp).is_integral();
4949
then {
50-
span_lint(cx, NEG_MULTIPLY, span, "Negation by multiplying with `-1`");
50+
span_lint(cx, NEG_MULTIPLY, span, "negation by multiplying with `-1`");
5151
}
5252
}
5353
}

tests/ui/neg_multiply.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
error: Negation by multiplying with `-1`
1+
error: negation by multiplying with `-1`
22
--> $DIR/neg_multiply.rs:27:5
33
|
44
LL | x * -1;
55
| ^^^^^^
66
|
77
= note: `-D clippy::neg-multiply` implied by `-D warnings`
88

9-
error: Negation by multiplying with `-1`
9+
error: negation by multiplying with `-1`
1010
--> $DIR/neg_multiply.rs:29:5
1111
|
1212
LL | -1 * x;

0 commit comments

Comments
 (0)