diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2020-07-24 00:24:11 +0200 |
|---|---|---|
| committer | Matthias Krüger <matthias.krueger@famsik.de> | 2020-08-10 23:49:06 +0200 |
| commit | 178da9b2ef9e8c94ab0fbe7812e11445664f67b0 (patch) | |
| tree | 26e1c591ba82fcd4e033ccd627ba5b39ee76698b | |
| parent | e519bb3c850199d03eed7f2bd29637b3d5479551 (diff) | |
| download | rust-178da9b2ef9e8c94ab0fbe7812e11445664f67b0.tar.gz rust-178da9b2ef9e8c94ab0fbe7812e11445664f67b0.zip | |
neg-multiply: make lint adhere to lint message convention
| -rw-r--r-- | clippy_lints/src/neg_multiply.rs | 2 | ||||
| -rw-r--r-- | tests/ui/neg_multiply.stderr | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/clippy_lints/src/neg_multiply.rs b/clippy_lints/src/neg_multiply.rs index 6b6c950e0ab..aa550510867 100644 --- a/clippy_lints/src/neg_multiply.rs +++ b/clippy_lints/src/neg_multiply.rs @@ -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`"); } } } diff --git a/tests/ui/neg_multiply.stderr b/tests/ui/neg_multiply.stderr index f08bbd6a12c..ad677f6d6fb 100644 --- a/tests/ui/neg_multiply.stderr +++ b/tests/ui/neg_multiply.stderr @@ -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; |
