Skip to content

Commit e517f1f

Browse files
committed
revert stabilization of const_intrinsic_copy
1 parent a04d56b commit e517f1f

File tree

5 files changed

+12
-11
lines changed

5 files changed

+12
-11
lines changed

library/core/src/intrinsics.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -2665,13 +2665,13 @@ pub(crate) fn is_nonoverlapping<T>(src: *const T, dst: *const T, count: usize) -
26652665
#[doc(alias = "memcpy")]
26662666
#[stable(feature = "rust1", since = "1.0.0")]
26672667
#[rustc_allowed_through_unstable_modules]
2668-
#[rustc_const_stable(feature = "const_intrinsic_copy", since = "1.63.0")]
2668+
#[rustc_const_unstable(feature = "const_intrinsic_copy", issue = "80697")]
26692669
#[inline(always)]
26702670
#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
26712671
#[rustc_diagnostic_item = "ptr_copy_nonoverlapping"]
26722672
pub const unsafe fn copy_nonoverlapping<T>(src: *const T, dst: *mut T, count: usize) {
26732673
extern "rust-intrinsic" {
2674-
#[rustc_const_stable(feature = "const_intrinsic_copy", since = "1.63.0")]
2674+
#[rustc_const_unstable(feature = "const_intrinsic_copy", issue = "80697")]
26752675
#[rustc_nounwind]
26762676
pub fn copy_nonoverlapping<T>(src: *const T, dst: *mut T, count: usize);
26772677
}
@@ -2761,13 +2761,13 @@ pub const unsafe fn copy_nonoverlapping<T>(src: *const T, dst: *mut T, count: us
27612761
#[doc(alias = "memmove")]
27622762
#[stable(feature = "rust1", since = "1.0.0")]
27632763
#[rustc_allowed_through_unstable_modules]
2764-
#[rustc_const_stable(feature = "const_intrinsic_copy", since = "1.63.0")]
2764+
#[rustc_const_unstable(feature = "const_intrinsic_copy", issue = "80697")]
27652765
#[inline(always)]
27662766
#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
27672767
#[rustc_diagnostic_item = "ptr_copy"]
27682768
pub const unsafe fn copy<T>(src: *const T, dst: *mut T, count: usize) {
27692769
extern "rust-intrinsic" {
2770-
#[rustc_const_stable(feature = "const_intrinsic_copy", since = "1.63.0")]
2770+
#[rustc_const_unstable(feature = "const_intrinsic_copy", issue = "80697")]
27712771
#[rustc_nounwind]
27722772
fn copy<T>(src: *const T, dst: *mut T, count: usize);
27732773
}

library/core/src/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@
135135
#![feature(const_heap)]
136136
#![feature(const_index_range_slice_index)]
137137
#![feature(const_int_unchecked_arith)]
138+
#![feature(const_intrinsic_copy)]
138139
#![feature(const_intrinsic_forget)]
139140
#![feature(const_ipv4)]
140141
#![feature(const_ipv6)]

library/core/src/ptr/const_ptr.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1283,7 +1283,7 @@ impl<T: ?Sized> *const T {
12831283
/// See [`ptr::copy`] for safety concerns and examples.
12841284
///
12851285
/// [`ptr::copy`]: crate::ptr::copy()
1286-
#[rustc_const_stable(feature = "const_intrinsic_copy", since = "1.63.0")]
1286+
#[rustc_const_unstable(feature = "const_intrinsic_copy", issue = "80697")]
12871287
#[stable(feature = "pointer_methods", since = "1.26.0")]
12881288
#[inline]
12891289
#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
@@ -1303,7 +1303,7 @@ impl<T: ?Sized> *const T {
13031303
/// See [`ptr::copy_nonoverlapping`] for safety concerns and examples.
13041304
///
13051305
/// [`ptr::copy_nonoverlapping`]: crate::ptr::copy_nonoverlapping()
1306-
#[rustc_const_stable(feature = "const_intrinsic_copy", since = "1.63.0")]
1306+
#[rustc_const_unstable(feature = "const_intrinsic_copy", issue = "80697")]
13071307
#[stable(feature = "pointer_methods", since = "1.26.0")]
13081308
#[inline]
13091309
#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces

library/core/src/ptr/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1279,7 +1279,7 @@ pub const unsafe fn read<T>(src: *const T) -> T {
12791279
#[inline]
12801280
#[stable(feature = "ptr_unaligned", since = "1.17.0")]
12811281
#[rustc_const_stable(feature = "const_ptr_read", since = "1.71.0")]
1282-
#[rustc_allow_const_fn_unstable(const_mut_refs, const_maybe_uninit_as_mut_ptr)]
1282+
#[rustc_allow_const_fn_unstable(const_mut_refs, const_maybe_uninit_as_mut_ptr, const_intrinsic_copy)]
12831283
#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
12841284
#[rustc_diagnostic_item = "ptr_read_unaligned"]
12851285
pub const unsafe fn read_unaligned<T>(src: *const T) -> T {

library/core/src/ptr/mut_ptr.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -1384,7 +1384,7 @@ impl<T: ?Sized> *mut T {
13841384
/// See [`ptr::copy`] for safety concerns and examples.
13851385
///
13861386
/// [`ptr::copy`]: crate::ptr::copy()
1387-
#[rustc_const_stable(feature = "const_intrinsic_copy", since = "1.63.0")]
1387+
#[rustc_const_unstable(feature = "const_intrinsic_copy", issue = "80697")]
13881388
#[stable(feature = "pointer_methods", since = "1.26.0")]
13891389
#[inline(always)]
13901390
#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
@@ -1404,7 +1404,7 @@ impl<T: ?Sized> *mut T {
14041404
/// See [`ptr::copy_nonoverlapping`] for safety concerns and examples.
14051405
///
14061406
/// [`ptr::copy_nonoverlapping`]: crate::ptr::copy_nonoverlapping()
1407-
#[rustc_const_stable(feature = "const_intrinsic_copy", since = "1.63.0")]
1407+
#[rustc_const_unstable(feature = "const_intrinsic_copy", issue = "80697")]
14081408
#[stable(feature = "pointer_methods", since = "1.26.0")]
14091409
#[inline(always)]
14101410
#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
@@ -1424,7 +1424,7 @@ impl<T: ?Sized> *mut T {
14241424
/// See [`ptr::copy`] for safety concerns and examples.
14251425
///
14261426
/// [`ptr::copy`]: crate::ptr::copy()
1427-
#[rustc_const_stable(feature = "const_intrinsic_copy", since = "1.63.0")]
1427+
#[rustc_const_unstable(feature = "const_intrinsic_copy", issue = "80697")]
14281428
#[stable(feature = "pointer_methods", since = "1.26.0")]
14291429
#[inline(always)]
14301430
#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
@@ -1444,7 +1444,7 @@ impl<T: ?Sized> *mut T {
14441444
/// See [`ptr::copy_nonoverlapping`] for safety concerns and examples.
14451445
///
14461446
/// [`ptr::copy_nonoverlapping`]: crate::ptr::copy_nonoverlapping()
1447-
#[rustc_const_stable(feature = "const_intrinsic_copy", since = "1.63.0")]
1447+
#[rustc_const_unstable(feature = "const_intrinsic_copy", issue = "80697")]
14481448
#[stable(feature = "pointer_methods", since = "1.26.0")]
14491449
#[inline(always)]
14501450
#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces

0 commit comments

Comments
 (0)