From cc3e57147e7cf5933a2bfa4b92b5a3a5eb424997 Mon Sep 17 00:00:00 2001 From: Trevor Gross Date: Wed, 4 Jun 2025 20:56:35 +0000 Subject: Use the in-tree `compiler-builtins` Many of `std`'s dependency have a dependency on the crates.io `compiler-builtins` when used with the feature `rustc-std-workspace-core`. Use a Cargo patch to select the in-tree version instead. `compiler-builtins` is also added as a dependency of `rustc-std-workspace-core` so these crates can remove their crates.io dependency in the future. --- library/std/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'library/std') diff --git a/library/std/Cargo.toml b/library/std/Cargo.toml index 196b904d56a..8ad81959bfb 100644 --- a/library/std/Cargo.toml +++ b/library/std/Cargo.toml @@ -18,7 +18,7 @@ cfg-if = { version = "1.0", features = ['rustc-dep-of-std'] } panic_unwind = { path = "../panic_unwind", optional = true } panic_abort = { path = "../panic_abort" } core = { path = "../core", public = true } -compiler_builtins = { version = "=0.1.160" } +compiler_builtins = { path = "../compiler-builtins/compiler-builtins" } unwind = { path = "../unwind" } hashbrown = { version = "0.15", default-features = false, features = [ 'rustc-dep-of-std', -- cgit 1.4.1-3-g733a5 From 3164ca8bb4ad6af6114926a4160edd95bbb18872 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Mon, 9 Jun 2025 12:36:24 +0200 Subject: stabilize nonnull_provenance --- library/alloc/src/lib.rs | 1 - library/alloctests/lib.rs | 1 - library/core/src/ptr/non_null.rs | 7 ++++--- library/std/src/lib.rs | 1 - 4 files changed, 4 insertions(+), 6 deletions(-) (limited to 'library/std') diff --git a/library/alloc/src/lib.rs b/library/alloc/src/lib.rs index 30540f48aa1..f416732a8d6 100644 --- a/library/alloc/src/lib.rs +++ b/library/alloc/src/lib.rs @@ -131,7 +131,6 @@ #![feature(local_waker)] #![feature(maybe_uninit_slice)] #![feature(maybe_uninit_uninit_array_transpose)] -#![feature(nonnull_provenance)] #![feature(panic_internals)] #![feature(pattern)] #![feature(pin_coerce_unsized_trait)] diff --git a/library/alloctests/lib.rs b/library/alloctests/lib.rs index 56e60ed4c84..3241b4b0045 100644 --- a/library/alloctests/lib.rs +++ b/library/alloctests/lib.rs @@ -28,7 +28,6 @@ #![feature(iter_next_chunk)] #![feature(maybe_uninit_slice)] #![feature(maybe_uninit_uninit_array_transpose)] -#![feature(nonnull_provenance)] #![feature(ptr_alignment_type)] #![feature(ptr_internals)] #![feature(sized_type_properties)] diff --git a/library/core/src/ptr/non_null.rs b/library/core/src/ptr/non_null.rs index 91b8d1bf9a7..1fae5b83902 100644 --- a/library/core/src/ptr/non_null.rs +++ b/library/core/src/ptr/non_null.rs @@ -89,7 +89,8 @@ impl NonNull { /// For more details, see the equivalent method on a raw pointer, [`ptr::without_provenance_mut`]. /// /// This is a [Strict Provenance][crate::ptr#strict-provenance] API. - #[unstable(feature = "nonnull_provenance", issue = "135243")] + #[stable(feature = "nonnull_provenance", since = "CURRENT_RUSTC_VERSION")] + #[rustc_const_stable(feature = "nonnull_provenance", since = "CURRENT_RUSTC_VERSION")] #[must_use] #[inline] pub const fn without_provenance(addr: NonZero) -> Self { @@ -132,7 +133,7 @@ impl NonNull { /// For more details, see the equivalent method on a raw pointer, [`ptr::with_exposed_provenance_mut`]. /// /// This is an [Exposed Provenance][crate::ptr#exposed-provenance] API. - #[unstable(feature = "nonnull_provenance", issue = "135243")] + #[stable(feature = "nonnull_provenance", since = "CURRENT_RUSTC_VERSION")] #[inline] pub fn with_exposed_provenance(addr: NonZero) -> Self { // SAFETY: we know `addr` is non-zero. @@ -329,7 +330,7 @@ impl NonNull { /// For more details, see the equivalent method on a raw pointer, [`pointer::expose_provenance`]. /// /// This is an [Exposed Provenance][crate::ptr#exposed-provenance] API. - #[unstable(feature = "nonnull_provenance", issue = "135243")] + #[stable(feature = "nonnull_provenance", since = "CURRENT_RUSTC_VERSION")] pub fn expose_provenance(self) -> NonZero { // SAFETY: The pointer is guaranteed by the type to be non-null, // meaning that the address will be non-zero. diff --git a/library/std/src/lib.rs b/library/std/src/lib.rs index 7c54e731edc..2bb7a63772d 100644 --- a/library/std/src/lib.rs +++ b/library/std/src/lib.rs @@ -351,7 +351,6 @@ #![feature(lazy_get)] #![feature(maybe_uninit_slice)] #![feature(maybe_uninit_write_slice)] -#![feature(nonnull_provenance)] #![feature(panic_can_unwind)] #![feature(panic_internals)] #![feature(pin_coerce_unsized_trait)] -- cgit 1.4.1-3-g733a5