We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 54a9168 commit dae54faCopy full SHA for dae54fa
clippy_lints/src/fn_null_check.rs
@@ -21,7 +21,7 @@ declare_clippy_lint! {
21
/// if (fn_ptr as *const ()).is_null() { ... }
22
/// ```
23
/// Use instead:
24
- /// ```rust
+ /// ```rust,ignore
25
/// let fn_ptr: Option<fn()> = /* somehow obtained nullable function pointer */
26
///
27
/// if fn_ptr.is_none() { ... }
clippy_lints/src/transmute/mod.rs
@@ -426,7 +426,7 @@ declare_clippy_lint! {
426
427
/// ### Example
428
/// ```rust
429
- /// let null_fn: fn() = unsafe { std::mem::transmute( std::ptr::null() ) };
+ /// let null_fn: fn() = unsafe { std::mem::transmute( std::ptr::null::<()>() ) };
430
431
432
0 commit comments