File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -1577,8 +1577,9 @@ impl<T: ?Sized> *mut T {
15771577 ///
15781578 /// [`ptr::replace`]: crate::ptr::replace()
15791579 #[ stable( feature = "pointer_methods" , since = "1.26.0" ) ]
1580+ #[ rustc_const_stable( feature = "const_inherent_ptr_replace" , since = "CURRENT_RUSTC_VERSION" ) ]
15801581 #[ inline( always) ]
1581- pub unsafe fn replace ( self , src : T ) -> T
1582+ pub const unsafe fn replace ( self , src : T ) -> T
15821583 where
15831584 T : Sized ,
15841585 {
Original file line number Diff line number Diff line change @@ -1169,7 +1169,8 @@ impl<T: ?Sized> NonNull<T> {
11691169 /// [`ptr::replace`]: crate::ptr::replace()
11701170 #[ inline( always) ]
11711171 #[ stable( feature = "non_null_convenience" , since = "1.80.0" ) ]
1172- pub unsafe fn replace ( self , src : T ) -> T
1172+ #[ rustc_const_stable( feature = "const_inherent_ptr_replace" , since = "CURRENT_RUSTC_VERSION" ) ]
1173+ pub const unsafe fn replace ( self , src : T ) -> T
11731174 where
11741175 T : Sized ,
11751176 {
You can’t perform that action at this time.
0 commit comments