File tree 2 files changed +4
-2
lines changed
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 {
1577
1577
///
1578
1578
/// [`ptr::replace`]: crate::ptr::replace()
1579
1579
#[ stable( feature = "pointer_methods" , since = "1.26.0" ) ]
1580
+ #[ rustc_const_stable( feature = "const_inherent_ptr_replace" , since = "CURRENT_RUSTC_VERSION" ) ]
1580
1581
#[ inline( always) ]
1581
- pub unsafe fn replace ( self , src : T ) -> T
1582
+ pub const unsafe fn replace ( self , src : T ) -> T
1582
1583
where
1583
1584
T : Sized ,
1584
1585
{
Original file line number Diff line number Diff line change @@ -1169,7 +1169,8 @@ impl<T: ?Sized> NonNull<T> {
1169
1169
/// [`ptr::replace`]: crate::ptr::replace()
1170
1170
#[ inline( always) ]
1171
1171
#[ 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
1173
1174
where
1174
1175
T : Sized ,
1175
1176
{
You can’t perform that action at this time.
0 commit comments