mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-24 15:54:15 +00:00
Doc codeblock fixup
This commit is contained in:
parent
54a9168efb
commit
dae54fad3e
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user