cmp_null: make lint adhere to lint message convention

This commit is contained in:
Matthias Krüger 2020-07-23 19:21:31 +02:00
parent 8679dd375b
commit 3d592b5154
2 changed files with 3 additions and 3 deletions

View File

@ -145,7 +145,7 @@ impl<'tcx> LateLintPass<'tcx> for Ptr {
cx,
CMP_NULL,
expr.span,
"Comparing with null is better expressed by the `.is_null()` method",
"comparing with null is better expressed by the `.is_null()` method",
);
}
}

View File

@ -1,4 +1,4 @@
error: Comparing with null is better expressed by the `.is_null()` method
error: comparing with null is better expressed by the `.is_null()` method
--> $DIR/cmp_null.rs:9:8
|
LL | if p == ptr::null() {
@ -6,7 +6,7 @@ LL | if p == ptr::null() {
|
= note: `-D clippy::cmp-null` implied by `-D warnings`
error: Comparing with null is better expressed by the `.is_null()` method
error: comparing with null is better expressed by the `.is_null()` method
--> $DIR/cmp_null.rs:14:8
|
LL | if m == ptr::null_mut() {