Skip to content

Commit fe37ddb

Browse files
committed
suspicious-arithmetic-impl: make lint adhere to lint message convention
1 parent 7954c22 commit fe37ddb

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

clippy_lints/src/suspicious_trait_impl.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ impl<'tcx> LateLintPass<'tcx> for SuspiciousImpl {
9898
cx,
9999
SUSPICIOUS_ARITHMETIC_IMPL,
100100
binop.span,
101-
&format!(r#"Suspicious use of binary operator in `{}` impl"#, impl_trait),
101+
&format!("suspicious use of binary operator in `{}` impl", impl_trait),
102102
);
103103
}
104104

@@ -135,7 +135,7 @@ impl<'tcx> LateLintPass<'tcx> for SuspiciousImpl {
135135
cx,
136136
SUSPICIOUS_OP_ASSIGN_IMPL,
137137
binop.span,
138-
&format!(r#"Suspicious use of binary operator in `{}` impl"#, impl_trait),
138+
&format!("suspicious use of binary operator in `{}` impl", impl_trait),
139139
);
140140
}
141141
}

tests/ui/suspicious_arithmetic_impl.stderr

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
1-
error: Suspicious use of binary operator in `Add` impl
1+
error: suspicious use of binary operator in `Add` impl
22
--> $DIR/suspicious_arithmetic_impl.rs:11:20
33
|
44
LL | Foo(self.0 - other.0)
55
| ^
66
|
77
= note: `-D clippy::suspicious-arithmetic-impl` implied by `-D warnings`
88

9-
error: Suspicious use of binary operator in `AddAssign` impl
9+
error: suspicious use of binary operator in `AddAssign` impl
1010
--> $DIR/suspicious_arithmetic_impl.rs:17:23
1111
|
1212
LL | *self = *self - other;
1313
| ^
1414
|
1515
= note: `#[deny(clippy::suspicious_op_assign_impl)]` on by default
1616

17-
error: Suspicious use of binary operator in `MulAssign` impl
17+
error: suspicious use of binary operator in `MulAssign` impl
1818
--> $DIR/suspicious_arithmetic_impl.rs:30:16
1919
|
2020
LL | self.0 /= other.0;

0 commit comments

Comments
 (0)