From ede9451915390451ab7bb005b5b7039aab068de7 Mon Sep 17 00:00:00 2001 From: George Burton Date: Tue, 4 Sep 2018 20:24:34 +0100 Subject: [PATCH] Allow ptr::{null, null_mut} to create pointers to ?Sized types --- src/libcore/ptr.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libcore/ptr.rs b/src/libcore/ptr.rs index 3d84e910fe662..fc1326da76145 100644 --- a/src/libcore/ptr.rs +++ b/src/libcore/ptr.rs @@ -74,7 +74,7 @@ pub unsafe fn drop_in_place(to_drop: *mut T) { /// ``` #[inline] #[stable(feature = "rust1", since = "1.0.0")] -pub const fn null() -> *const T { 0 as *const T } +pub const fn null() -> *const T { 0 as *const T } /// Creates a null mutable raw pointer. /// @@ -88,7 +88,7 @@ pub const fn null() -> *const T { 0 as *const T } /// ``` #[inline] #[stable(feature = "rust1", since = "1.0.0")] -pub const fn null_mut() -> *mut T { 0 as *mut T } +pub const fn null_mut() -> *mut T { 0 as *mut T } /// Swaps the values at two mutable locations of the same type, without /// deinitializing either.