Stabilize #![feature(non_null_from_ref)]
This commit is contained in:
committed by
Mathis Bottinelli
parent
7188f45311
commit
e83a0a4bbe
@@ -111,7 +111,6 @@
|
||||
#![feature(is_ascii_octdigit)]
|
||||
#![feature(lazy_get)]
|
||||
#![feature(link_cfg)]
|
||||
#![feature(non_null_from_ref)]
|
||||
#![feature(offset_of_enum)]
|
||||
#![feature(panic_internals)]
|
||||
#![feature(ptr_alignment_type)]
|
||||
|
||||
@@ -262,7 +262,8 @@ impl<T: ?Sized> NonNull<T> {
|
||||
}
|
||||
|
||||
/// Converts a reference to a `NonNull` pointer.
|
||||
#[unstable(feature = "non_null_from_ref", issue = "130823")]
|
||||
#[stable(feature = "non_null_from_ref", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[rustc_const_stable(feature = "non_null_from_ref", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[inline]
|
||||
pub const fn from_ref(r: &T) -> Self {
|
||||
// SAFETY: A reference cannot be null.
|
||||
@@ -270,7 +271,8 @@ impl<T: ?Sized> NonNull<T> {
|
||||
}
|
||||
|
||||
/// Converts a mutable reference to a `NonNull` pointer.
|
||||
#[unstable(feature = "non_null_from_ref", issue = "130823")]
|
||||
#[stable(feature = "non_null_from_ref", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[rustc_const_stable(feature = "non_null_from_ref", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[inline]
|
||||
pub const fn from_mut(r: &mut T) -> Self {
|
||||
// SAFETY: A mutable reference cannot be null.
|
||||
|
||||
Reference in New Issue
Block a user