Skip to content

Commit db0f337

Browse files
committed
stabilize const_intrinsic_copy
1 parent ba6158c commit db0f337

File tree

8 files changed

+15
-23
lines changed

8 files changed

+15
-23
lines changed

core/src/intrinsics.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -3286,13 +3286,13 @@ pub const fn ptr_metadata<P: ptr::Pointee<Metadata = M> + ?Sized, M>(_ptr: *cons
32863286
#[doc(alias = "memcpy")]
32873287
#[stable(feature = "rust1", since = "1.0.0")]
32883288
#[rustc_allowed_through_unstable_modules]
3289-
#[rustc_const_unstable(feature = "const_intrinsic_copy", issue = "80697")]
3289+
#[rustc_const_stable(feature = "const_intrinsic_copy", since = "CURRENT_RUSTC_VERSION")]
32903290
#[inline(always)]
32913291
#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
32923292
#[rustc_diagnostic_item = "ptr_copy_nonoverlapping"]
32933293
pub const unsafe fn copy_nonoverlapping<T>(src: *const T, dst: *mut T, count: usize) {
32943294
extern "rust-intrinsic" {
3295-
#[rustc_const_unstable(feature = "const_intrinsic_copy", issue = "80697")]
3295+
#[rustc_const_stable(feature = "const_intrinsic_copy", since = "CURRENT_RUSTC_VERSION")]
32963296
#[rustc_nounwind]
32973297
pub fn copy_nonoverlapping<T>(src: *const T, dst: *mut T, count: usize);
32983298
}
@@ -3388,13 +3388,13 @@ pub const unsafe fn copy_nonoverlapping<T>(src: *const T, dst: *mut T, count: us
33883388
#[doc(alias = "memmove")]
33893389
#[stable(feature = "rust1", since = "1.0.0")]
33903390
#[rustc_allowed_through_unstable_modules]
3391-
#[rustc_const_unstable(feature = "const_intrinsic_copy", issue = "80697")]
3391+
#[rustc_const_stable(feature = "const_intrinsic_copy", since = "CURRENT_RUSTC_VERSION")]
33923392
#[inline(always)]
33933393
#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
33943394
#[rustc_diagnostic_item = "ptr_copy"]
33953395
pub const unsafe fn copy<T>(src: *const T, dst: *mut T, count: usize) {
33963396
extern "rust-intrinsic" {
3397-
#[rustc_const_unstable(feature = "const_intrinsic_copy", issue = "80697")]
3397+
#[rustc_const_stable(feature = "const_intrinsic_copy", since = "CURRENT_RUSTC_VERSION")]
33983398
#[rustc_nounwind]
33993399
fn copy<T>(src: *const T, dst: *mut T, count: usize);
34003400
}

core/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,6 @@
128128
#![feature(const_hash)]
129129
#![feature(const_heap)]
130130
#![feature(const_index_range_slice_index)]
131-
#![feature(const_intrinsic_copy)]
132131
#![feature(const_intrinsic_forget)]
133132
#![feature(const_ipv4)]
134133
#![feature(const_ipv6)]

core/src/ptr/const_ptr.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1192,7 +1192,7 @@ impl<T: ?Sized> *const T {
11921192
/// See [`ptr::copy`] for safety concerns and examples.
11931193
///
11941194
/// [`ptr::copy`]: crate::ptr::copy()
1195-
#[rustc_const_unstable(feature = "const_intrinsic_copy", issue = "80697")]
1195+
#[rustc_const_stable(feature = "const_intrinsic_copy", since = "CURRENT_RUSTC_VERSION")]
11961196
#[stable(feature = "pointer_methods", since = "1.26.0")]
11971197
#[inline]
11981198
#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
@@ -1212,7 +1212,7 @@ impl<T: ?Sized> *const T {
12121212
/// See [`ptr::copy_nonoverlapping`] for safety concerns and examples.
12131213
///
12141214
/// [`ptr::copy_nonoverlapping`]: crate::ptr::copy_nonoverlapping()
1215-
#[rustc_const_unstable(feature = "const_intrinsic_copy", issue = "80697")]
1215+
#[rustc_const_stable(feature = "const_intrinsic_copy", since = "CURRENT_RUSTC_VERSION")]
12161216
#[stable(feature = "pointer_methods", since = "1.26.0")]
12171217
#[inline]
12181218
#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces

core/src/ptr/mod.rs

+1-5
Original file line numberDiff line numberDiff line change
@@ -1516,11 +1516,7 @@ pub const unsafe fn read<T>(src: *const T) -> T {
15161516
#[inline]
15171517
#[stable(feature = "ptr_unaligned", since = "1.17.0")]
15181518
#[rustc_const_stable(feature = "const_ptr_read", since = "1.71.0")]
1519-
#[rustc_allow_const_fn_unstable(
1520-
const_mut_refs,
1521-
const_maybe_uninit_as_mut_ptr,
1522-
const_intrinsic_copy
1523-
)]
1519+
#[cfg_attr(bootstrap, rustc_allow_const_fn_unstable(const_mut_refs))]
15241520
#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
15251521
#[rustc_diagnostic_item = "ptr_read_unaligned"]
15261522
pub const unsafe fn read_unaligned<T>(src: *const T) -> T {

core/src/ptr/mut_ptr.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -1269,7 +1269,7 @@ impl<T: ?Sized> *mut T {
12691269
/// See [`ptr::copy`] for safety concerns and examples.
12701270
///
12711271
/// [`ptr::copy`]: crate::ptr::copy()
1272-
#[rustc_const_unstable(feature = "const_intrinsic_copy", issue = "80697")]
1272+
#[rustc_const_stable(feature = "const_intrinsic_copy", since = "CURRENT_RUSTC_VERSION")]
12731273
#[stable(feature = "pointer_methods", since = "1.26.0")]
12741274
#[inline(always)]
12751275
#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
@@ -1289,7 +1289,7 @@ impl<T: ?Sized> *mut T {
12891289
/// See [`ptr::copy_nonoverlapping`] for safety concerns and examples.
12901290
///
12911291
/// [`ptr::copy_nonoverlapping`]: crate::ptr::copy_nonoverlapping()
1292-
#[rustc_const_unstable(feature = "const_intrinsic_copy", issue = "80697")]
1292+
#[rustc_const_stable(feature = "const_intrinsic_copy", since = "CURRENT_RUSTC_VERSION")]
12931293
#[stable(feature = "pointer_methods", since = "1.26.0")]
12941294
#[inline(always)]
12951295
#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
@@ -1309,7 +1309,7 @@ impl<T: ?Sized> *mut T {
13091309
/// See [`ptr::copy`] for safety concerns and examples.
13101310
///
13111311
/// [`ptr::copy`]: crate::ptr::copy()
1312-
#[rustc_const_unstable(feature = "const_intrinsic_copy", issue = "80697")]
1312+
#[rustc_const_stable(feature = "const_intrinsic_copy", since = "CURRENT_RUSTC_VERSION")]
13131313
#[stable(feature = "pointer_methods", since = "1.26.0")]
13141314
#[inline(always)]
13151315
#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
@@ -1329,7 +1329,7 @@ impl<T: ?Sized> *mut T {
13291329
/// See [`ptr::copy_nonoverlapping`] for safety concerns and examples.
13301330
///
13311331
/// [`ptr::copy_nonoverlapping`]: crate::ptr::copy_nonoverlapping()
1332-
#[rustc_const_unstable(feature = "const_intrinsic_copy", issue = "80697")]
1332+
#[rustc_const_stable(feature = "const_intrinsic_copy", since = "CURRENT_RUSTC_VERSION")]
13331333
#[stable(feature = "pointer_methods", since = "1.26.0")]
13341334
#[inline(always)]
13351335
#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces

core/src/ptr/non_null.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -924,7 +924,7 @@ impl<T: ?Sized> NonNull<T> {
924924
#[inline(always)]
925925
#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
926926
#[stable(feature = "non_null_convenience", since = "1.80.0")]
927-
#[rustc_const_unstable(feature = "const_intrinsic_copy", issue = "80697")]
927+
#[rustc_const_stable(feature = "const_intrinsic_copy", since = "CURRENT_RUSTC_VERSION")]
928928
pub const unsafe fn copy_to(self, dest: NonNull<T>, count: usize)
929929
where
930930
T: Sized,
@@ -944,7 +944,7 @@ impl<T: ?Sized> NonNull<T> {
944944
#[inline(always)]
945945
#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
946946
#[stable(feature = "non_null_convenience", since = "1.80.0")]
947-
#[rustc_const_unstable(feature = "const_intrinsic_copy", issue = "80697")]
947+
#[rustc_const_stable(feature = "const_intrinsic_copy", since = "CURRENT_RUSTC_VERSION")]
948948
pub const unsafe fn copy_to_nonoverlapping(self, dest: NonNull<T>, count: usize)
949949
where
950950
T: Sized,
@@ -964,7 +964,7 @@ impl<T: ?Sized> NonNull<T> {
964964
#[inline(always)]
965965
#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
966966
#[stable(feature = "non_null_convenience", since = "1.80.0")]
967-
#[rustc_const_unstable(feature = "const_intrinsic_copy", issue = "80697")]
967+
#[rustc_const_stable(feature = "const_intrinsic_copy", since = "CURRENT_RUSTC_VERSION")]
968968
pub const unsafe fn copy_from(self, src: NonNull<T>, count: usize)
969969
where
970970
T: Sized,
@@ -984,7 +984,7 @@ impl<T: ?Sized> NonNull<T> {
984984
#[inline(always)]
985985
#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
986986
#[stable(feature = "non_null_convenience", since = "1.80.0")]
987-
#[rustc_const_unstable(feature = "const_intrinsic_copy", issue = "80697")]
987+
#[rustc_const_stable(feature = "const_intrinsic_copy", since = "CURRENT_RUSTC_VERSION")]
988988
pub const unsafe fn copy_from_nonoverlapping(self, src: NonNull<T>, count: usize)
989989
where
990990
T: Sized,

core/tests/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
#![feature(const_cell_into_inner)]
2222
#![feature(const_hash)]
2323
#![feature(const_heap)]
24-
#![feature(const_intrinsic_copy)]
2524
#![feature(const_ip)]
2625
#![feature(const_ipv4)]
2726
#![feature(const_ipv6)]

portable-simd/crates/core_simd/src/lib.rs

-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
#![no_std]
22
#![feature(
3-
const_intrinsic_copy,
43
const_refs_to_cell,
5-
const_maybe_uninit_as_mut_ptr,
64
const_mut_refs,
75
convert_float_to_int,
86
core_intrinsics,

0 commit comments

Comments
 (0)