Skip to content

Commit 3d592b5

Browse files
committed
cmp_null: make lint adhere to lint message convention
1 parent 8679dd3 commit 3d592b5

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

clippy_lints/src/ptr.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ impl<'tcx> LateLintPass<'tcx> for Ptr {
145145
cx,
146146
CMP_NULL,
147147
expr.span,
148-
"Comparing with null is better expressed by the `.is_null()` method",
148+
"comparing with null is better expressed by the `.is_null()` method",
149149
);
150150
}
151151
}

tests/ui/cmp_null.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
error: Comparing with null is better expressed by the `.is_null()` method
1+
error: comparing with null is better expressed by the `.is_null()` method
22
--> $DIR/cmp_null.rs:9:8
33
|
44
LL | if p == ptr::null() {
55
| ^^^^^^^^^^^^^^^^
66
|
77
= note: `-D clippy::cmp-null` implied by `-D warnings`
88

9-
error: Comparing with null is better expressed by the `.is_null()` method
9+
error: comparing with null is better expressed by the `.is_null()` method
1010
--> $DIR/cmp_null.rs:14:8
1111
|
1212
LL | if m == ptr::null_mut() {

0 commit comments

Comments
 (0)