Skip to content

Commit 5178133

Browse files
matthiaskrgrgitbot
authored and
gitbot
committed
Rollup merge of rust-lang#136434 - RalfJung:rustc_allowed_through_unstable_modules-deprecation-required, r=compiler-errors
rustc_allowed_through_unstable_modules: require deprecation message This changes the `#[rustc_allowed_through_unstable_modules]` attribute so that a deprecation message (ideally directing people towards the stable path) is required.
2 parents 5fd1bb5 + 5376994 commit 5178133

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

core/src/intrinsics/mod.rs

+5-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,11 @@ pub mod simd;
7878
use crate::sync::atomic::{self, AtomicBool, AtomicI32, AtomicIsize, AtomicU32, Ordering};
7979

8080
#[stable(feature = "drop_in_place", since = "1.8.0")]
81-
#[rustc_allowed_through_unstable_modules]
81+
#[cfg_attr(bootstrap, rustc_allowed_through_unstable_modules)]
82+
#[cfg_attr(
83+
not(bootstrap),
84+
rustc_allowed_through_unstable_modules = "import this function via `std::ptr` instead"
85+
)]
8286
#[deprecated(note = "no longer an intrinsic - use `ptr::drop_in_place` directly", since = "1.52.0")]
8387
#[inline]
8488
pub unsafe fn drop_in_place<T: ?Sized>(to_drop: *mut T) {

0 commit comments

Comments
 (0)