Skip to content

Commit e83a0a4

Browse files
committed
Stabilize #![feature(non_null_from_ref)]
1 parent 7188f45 commit e83a0a4

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

‎library/core/src/lib.rs‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,6 @@
111111
#![feature(is_ascii_octdigit)]
112112
#![feature(lazy_get)]
113113
#![feature(link_cfg)]
114-
#![feature(non_null_from_ref)]
115114
#![feature(offset_of_enum)]
116115
#![feature(panic_internals)]
117116
#![feature(ptr_alignment_type)]

‎library/core/src/ptr/non_null.rs‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -262,15 +262,17 @@ impl<T: ?Sized> NonNull<T> {
262262
}
263263

264264
/// 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")]
266267
#[inline]
267268
pubconstfnfrom_ref(r:&T) -> Self{
268269
// SAFETY: A reference cannot be null.
269270
unsafe{NonNull{pointer: r as*constT}}
270271
}
271272

272273
/// 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")]
274276
#[inline]
275277
pubconstfnfrom_mut(r:&mutT) -> Self{
276278
// SAFETY: A mutable reference cannot be null.

0 commit comments

Comments
 (0)