File tree 2 files changed +4
-3
lines changed
2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change 111
111
#![ feature( is_ascii_octdigit) ]
112
112
#![ feature( lazy_get) ]
113
113
#![ feature( link_cfg) ]
114
- #![ feature( non_null_from_ref) ]
115
114
#![ feature( offset_of_enum) ]
116
115
#![ feature( panic_internals) ]
117
116
#![ feature( ptr_alignment_type) ]
Original file line number Diff line number Diff line change @@ -262,15 +262,17 @@ impl<T: ?Sized> NonNull<T> {
262
262
}
263
263
264
264
/// Converts a reference to a `NonNull` pointer.
265
- #[ unstable( feature = "non_null_from_ref" , issue = "130823" ) ]
265
+ #[ stable( feature = "non_null_from_ref" , since = "CURRENT_RUSTC_VERSION" ) ]
266
+ #[ rustc_const_stable( feature = "non_null_from_ref" , since = "CURRENT_RUSTC_VERSION" ) ]
266
267
#[ inline]
267
268
pub const fn from_ref ( r : & T ) -> Self {
268
269
// SAFETY: A reference cannot be null.
269
270
unsafe { NonNull { pointer : r as * const T } }
270
271
}
271
272
272
273
/// Converts a mutable reference to a `NonNull` pointer.
273
- #[ unstable( feature = "non_null_from_ref" , issue = "130823" ) ]
274
+ #[ stable( feature = "non_null_from_ref" , since = "CURRENT_RUSTC_VERSION" ) ]
275
+ #[ rustc_const_stable( feature = "non_null_from_ref" , since = "CURRENT_RUSTC_VERSION" ) ]
274
276
#[ inline]
275
277
pub const fn from_mut ( r : & mut T ) -> Self {
276
278
// SAFETY: A mutable reference cannot be null.
You can’t perform that action at this time.
0 commit comments