We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
ptr::null(_mut)
1 parent 7130fc5 commit d0862ecCopy full SHA for d0862ec
src/libcore/ptr/mod.rs
@@ -188,7 +188,7 @@ unsafe fn real_drop_in_place<T: ?Sized>(to_drop: &mut T) {
188
/// let p: *const i32 = ptr::null();
189
/// assert!(p.is_null());
190
/// ```
191
-#[inline]
+#[inline(always)]
192
#[stable(feature = "rust1", since = "1.0.0")]
193
#[rustc_promotable]
194
pub const fn null<T>() -> *const T { 0 as *const T }
@@ -203,7 +203,7 @@ pub const fn null<T>() -> *const T { 0 as *const T }
203
/// let p: *mut i32 = ptr::null_mut();
204
205
206
207
208
209
pub const fn null_mut<T>() -> *mut T { 0 as *mut T }
0 commit comments