Function core::ptr::null

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

Creates a null raw pointer.

Examples

use std::ptr;

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