Skip to content

Commit ae78bcd

Browse files
committed
Mark stabilized intrinsics with rustc_allowed_through_unstable_modules
Fixes #99286 PR #95956 accidentally made these intrinsics unstable when accessed through the unstable path segment 'std::intrinsics'
1 parent 22d5eaf commit ae78bcd

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

core/src/intrinsics.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ use crate::mem;
6363
use crate::sync::atomic::{self, AtomicBool, AtomicI32, AtomicIsize, AtomicU32, Ordering};
6464

6565
#[stable(feature = "drop_in_place", since = "1.8.0")]
66+
#[cfg_attr(not(bootstrap), rustc_allowed_through_unstable_modules)]
6667
#[deprecated(note = "no longer an intrinsic - use `ptr::drop_in_place` directly", since = "1.52.0")]
6768
#[inline]
6869
pub unsafe fn drop_in_place<T: ?Sized>(to_drop: *mut T) {
@@ -2435,6 +2436,7 @@ pub(crate) fn is_nonoverlapping<T>(src: *const T, dst: *const T, count: usize) -
24352436
/// [`Vec::append`]: ../../std/vec/struct.Vec.html#method.append
24362437
#[doc(alias = "memcpy")]
24372438
#[stable(feature = "rust1", since = "1.0.0")]
2439+
#[cfg_attr(not(bootstrap), rustc_allowed_through_unstable_modules)]
24382440
#[rustc_const_stable(feature = "const_intrinsic_copy", since = "1.63.0")]
24392441
#[inline]
24402442
pub const unsafe fn copy_nonoverlapping<T>(src: *const T, dst: *mut T, count: usize) {
@@ -2520,6 +2522,7 @@ pub const unsafe fn copy_nonoverlapping<T>(src: *const T, dst: *mut T, count: us
25202522
/// ```
25212523
#[doc(alias = "memmove")]
25222524
#[stable(feature = "rust1", since = "1.0.0")]
2525+
#[cfg_attr(not(bootstrap), rustc_allowed_through_unstable_modules)]
25232526
#[rustc_const_stable(feature = "const_intrinsic_copy", since = "1.63.0")]
25242527
#[inline]
25252528
pub const unsafe fn copy<T>(src: *const T, dst: *mut T, count: usize) {
@@ -2609,6 +2612,7 @@ pub const unsafe fn copy<T>(src: *const T, dst: *mut T, count: usize) {
26092612
/// ```
26102613
#[doc(alias = "memset")]
26112614
#[stable(feature = "rust1", since = "1.0.0")]
2615+
#[cfg_attr(not(bootstrap), rustc_allowed_through_unstable_modules)]
26122616
#[rustc_const_unstable(feature = "const_ptr_write", issue = "86302")]
26132617
#[inline]
26142618
pub const unsafe fn write_bytes<T>(dst: *mut T, val: u8, count: usize) {

0 commit comments

Comments
 (0)