Doc codeblock fixup
This commit is contained in:
@@ -21,7 +21,7 @@ declare_clippy_lint! {
|
|||||||
/// if (fn_ptr as *const ()).is_null() { ... }
|
/// if (fn_ptr as *const ()).is_null() { ... }
|
||||||
/// ```
|
/// ```
|
||||||
/// Use instead:
|
/// Use instead:
|
||||||
/// ```rust
|
/// ```rust,ignore
|
||||||
/// let fn_ptr: Option<fn()> = /* somehow obtained nullable function pointer */
|
/// let fn_ptr: Option<fn()> = /* somehow obtained nullable function pointer */
|
||||||
///
|
///
|
||||||
/// if fn_ptr.is_none() { ... }
|
/// if fn_ptr.is_none() { ... }
|
||||||
|
|||||||
@@ -426,7 +426,7 @@ declare_clippy_lint! {
|
|||||||
///
|
///
|
||||||
/// ### Example
|
/// ### Example
|
||||||
/// ```rust
|
/// ```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:
|
/// Use instead:
|
||||||
/// ```rust
|
/// ```rust
|
||||||
|
|||||||
Reference in New Issue
Block a user