Doc codeblock fixup

This commit is contained in:
Niki4tap 2022-12-18 03:20:04 +03:00
parent 54a9168efb
commit dae54fad3e
2 changed files with 2 additions and 2 deletions

View File

@ -21,7 +21,7 @@ declare_clippy_lint! {
/// if (fn_ptr as *const ()).is_null() { ... }
/// ```
/// Use instead:
/// ```rust
/// ```rust,ignore
/// let fn_ptr: Option<fn()> = /* somehow obtained nullable function pointer */
///
/// if fn_ptr.is_none() { ... }

View File

@ -426,7 +426,7 @@ declare_clippy_lint! {
///
/// ### Example
/// ```rust
/// let null_fn: fn() = unsafe { std::mem::transmute( std::ptr::null() ) };
/// let null_fn: fn() = unsafe { std::mem::transmute( std::ptr::null::<()>() ) };
/// ```
/// Use instead:
/// ```rust