Skip to content

Commit 8599818

Browse files
committed
cmp_null: add missing parens and mention of ptr::null_mut in its docs
1 parent b946ba1 commit 8599818

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

clippy_lints/src/ptr/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ declare_clippy_lint! {
4545

4646
declare_clippy_lint! {
4747
/// ### What it does
48-
/// This lint checks for equality comparisons with `ptr::null`
48+
/// This lint checks for equality comparisons with `ptr::null` or `ptr::null_mut`
4949
///
5050
/// ### Why is this bad?
5151
/// It's easier and more readable to use the inherent
@@ -56,7 +56,7 @@ declare_clippy_lint! {
5656
/// ```rust,ignore
5757
/// use std::ptr;
5858
///
59-
/// if x == ptr::null {
59+
/// if x == ptr::null() {
6060
/// // ..
6161
/// }
6262
/// ```

0 commit comments

Comments
 (0)