We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
cmp_null
ptr::null_mut
1 parent b946ba1 commit 8599818Copy full SHA for 8599818
clippy_lints/src/ptr/mod.rs
@@ -45,7 +45,7 @@ declare_clippy_lint! {
45
46
declare_clippy_lint! {
47
/// ### What it does
48
- /// This lint checks for equality comparisons with `ptr::null`
+ /// This lint checks for equality comparisons with `ptr::null` or `ptr::null_mut`
49
///
50
/// ### Why is this bad?
51
/// It's easier and more readable to use the inherent
@@ -56,7 +56,7 @@ declare_clippy_lint! {
56
/// ```rust,ignore
57
/// use std::ptr;
58
59
- /// if x == ptr::null {
+ /// if x == ptr::null() {
60
/// // ..
61
/// }
62
/// ```
0 commit comments