Skip to content

Commit fd06f6d

Browse files
authored
Rollup merge of #142238 - RalfJung:nonnull_provenance, r=workingjubilee
stabilize nonnull_provenance Fixes #135243 FCP passed in #135243
2 parents facc5da + 3164ca8 commit fd06f6d

File tree

4 files changed

+4
-6
lines changed

4 files changed

+4
-6
lines changed

library/alloc/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,6 @@
131131
#![feature(local_waker)]
132132
#![feature(maybe_uninit_slice)]
133133
#![feature(maybe_uninit_uninit_array_transpose)]
134-
#![feature(nonnull_provenance)]
135134
#![feature(panic_internals)]
136135
#![feature(pattern)]
137136
#![feature(pin_coerce_unsized_trait)]

library/alloctests/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
#![feature(iter_next_chunk)]
2929
#![feature(maybe_uninit_slice)]
3030
#![feature(maybe_uninit_uninit_array_transpose)]
31-
#![feature(nonnull_provenance)]
3231
#![feature(ptr_alignment_type)]
3332
#![feature(ptr_internals)]
3433
#![feature(sized_type_properties)]

library/core/src/ptr/non_null.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,8 @@ impl<T: Sized> NonNull<T> {
8989
/// For more details, see the equivalent method on a raw pointer, [`ptr::without_provenance_mut`].
9090
///
9191
/// This is a [Strict Provenance][crate::ptr#strict-provenance] API.
92-
#[unstable(feature = "nonnull_provenance", issue = "135243")]
92+
#[stable(feature = "nonnull_provenance", since = "CURRENT_RUSTC_VERSION")]
93+
#[rustc_const_stable(feature = "nonnull_provenance", since = "CURRENT_RUSTC_VERSION")]
9394
#[must_use]
9495
#[inline]
9596
pub const fn without_provenance(addr: NonZero<usize>) -> Self {
@@ -132,7 +133,7 @@ impl<T: Sized> NonNull<T> {
132133
/// For more details, see the equivalent method on a raw pointer, [`ptr::with_exposed_provenance_mut`].
133134
///
134135
/// This is an [Exposed Provenance][crate::ptr#exposed-provenance] API.
135-
#[unstable(feature = "nonnull_provenance", issue = "135243")]
136+
#[stable(feature = "nonnull_provenance", since = "CURRENT_RUSTC_VERSION")]
136137
#[inline]
137138
pub fn with_exposed_provenance(addr: NonZero<usize>) -> Self {
138139
// SAFETY: we know `addr` is non-zero.
@@ -329,7 +330,7 @@ impl<T: ?Sized> NonNull<T> {
329330
/// For more details, see the equivalent method on a raw pointer, [`pointer::expose_provenance`].
330331
///
331332
/// This is an [Exposed Provenance][crate::ptr#exposed-provenance] API.
332-
#[unstable(feature = "nonnull_provenance", issue = "135243")]
333+
#[stable(feature = "nonnull_provenance", since = "CURRENT_RUSTC_VERSION")]
333334
pub fn expose_provenance(self) -> NonZero<usize> {
334335
// SAFETY: The pointer is guaranteed by the type to be non-null,
335336
// meaning that the address will be non-zero.

library/std/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,6 @@
351351
#![feature(lazy_get)]
352352
#![feature(maybe_uninit_slice)]
353353
#![feature(maybe_uninit_write_slice)]
354-
#![feature(nonnull_provenance)]
355354
#![feature(panic_can_unwind)]
356355
#![feature(panic_internals)]
357356
#![feature(pin_coerce_unsized_trait)]

0 commit comments

Comments
 (0)