Function core::ptr::null_mut

1.0.0 (const: 1.24.0) · source · []
pub const fn null_mut<T: ?Sized + Thin>() -> *mut T
Expand description

Creates a null mutable raw pointer.

Examples

use std::ptr;

let p: *mut i32 = ptr::null_mut();
assert!(p.is_null());
Run
This documentation is an old archive. Please see https://rust.docs.kernel.org instead.