Skip to content

Commit dae54fa

Browse files
committed
Doc codeblock fixup
1 parent 54a9168 commit dae54fa

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

clippy_lints/src/fn_null_check.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ declare_clippy_lint! {
2121
/// if (fn_ptr as *const ()).is_null() { ... }
2222
/// ```
2323
/// Use instead:
24-
/// ```rust
24+
/// ```rust,ignore
2525
/// let fn_ptr: Option<fn()> = /* somehow obtained nullable function pointer */
2626
///
2727
/// if fn_ptr.is_none() { ... }

clippy_lints/src/transmute/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,7 @@ declare_clippy_lint! {
426426
///
427427
/// ### Example
428428
/// ```rust
429-
/// let null_fn: fn() = unsafe { std::mem::transmute( std::ptr::null() ) };
429+
/// let null_fn: fn() = unsafe { std::mem::transmute( std::ptr::null::<()>() ) };
430430
/// ```
431431
/// Use instead:
432432
/// ```rust

0 commit comments

Comments
 (0)