cmp_null: make lint adhere to lint message convention
This commit is contained in:
parent
8679dd375b
commit
3d592b5154
@ -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",
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -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() {
|
||||
|
Loading…
Reference in New Issue
Block a user