Skip to content

Commit 80b8460

Browse files
committed
Stabilize const_intrinsic_copy
1 parent 307e75a commit 80b8460

File tree

7 files changed

+12
-15
lines changed

7 files changed

+12
-15
lines changed

alloc/tests/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
#![feature(const_convert)]
88
#![feature(const_cow_is_borrowed)]
99
#![feature(const_heap)]
10-
#![feature(const_intrinsic_copy)]
1110
#![feature(const_mut_refs)]
1211
#![feature(const_nonnull_slice_from_raw_parts)]
1312
#![feature(const_ptr_write)]

core/src/intrinsics.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -2118,11 +2118,11 @@ pub(crate) fn is_nonoverlapping<T>(src: *const T, dst: *const T, count: usize) -
21182118
/// [`Vec::append`]: ../../std/vec/struct.Vec.html#method.append
21192119
#[doc(alias = "memcpy")]
21202120
#[stable(feature = "rust1", since = "1.0.0")]
2121-
#[rustc_const_unstable(feature = "const_intrinsic_copy", issue = "80697")]
2121+
#[rustc_const_stable(feature = "const_intrinsic_copy", since = "1.63.0")]
21222122
#[inline]
21232123
pub const unsafe fn copy_nonoverlapping<T>(src: *const T, dst: *mut T, count: usize) {
21242124
extern "rust-intrinsic" {
2125-
#[rustc_const_unstable(feature = "const_intrinsic_copy", issue = "80697")]
2125+
#[rustc_const_stable(feature = "const_intrinsic_copy", since = "1.63.0")]
21262126
pub fn copy_nonoverlapping<T>(src: *const T, dst: *mut T, count: usize);
21272127
}
21282128

@@ -2200,11 +2200,11 @@ pub const unsafe fn copy_nonoverlapping<T>(src: *const T, dst: *mut T, count: us
22002200
/// ```
22012201
#[doc(alias = "memmove")]
22022202
#[stable(feature = "rust1", since = "1.0.0")]
2203-
#[rustc_const_unstable(feature = "const_intrinsic_copy", issue = "80697")]
2203+
#[rustc_const_stable(feature = "const_intrinsic_copy", since = "1.63.0")]
22042204
#[inline]
22052205
pub const unsafe fn copy<T>(src: *const T, dst: *mut T, count: usize) {
22062206
extern "rust-intrinsic" {
2207-
#[rustc_const_unstable(feature = "const_intrinsic_copy", issue = "80697")]
2207+
#[rustc_const_stable(feature = "const_intrinsic_copy", since = "1.63.0")]
22082208
fn copy<T>(src: *const T, dst: *mut T, count: usize);
22092209
}
22102210

core/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,6 @@
114114
#![feature(const_convert)]
115115
#![feature(const_inherent_unchecked_arith)]
116116
#![feature(const_int_unchecked_arith)]
117-
#![feature(const_intrinsic_copy)]
118117
#![feature(const_intrinsic_forget)]
119118
#![feature(const_likely)]
120119
#![feature(const_maybe_uninit_uninit_array)]

core/src/ptr/const_ptr.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1199,7 +1199,7 @@ impl<T: ?Sized> *const T {
11991199
/// See [`ptr::copy`] for safety concerns and examples.
12001200
///
12011201
/// [`ptr::copy`]: crate::ptr::copy()
1202-
#[rustc_const_unstable(feature = "const_intrinsic_copy", issue = "80697")]
1202+
#[rustc_const_stable(feature = "const_intrinsic_copy", since = "1.63.0")]
12031203
#[stable(feature = "pointer_methods", since = "1.26.0")]
12041204
#[inline]
12051205
pub const unsafe fn copy_to(self, dest: *mut T, count: usize)
@@ -1218,7 +1218,7 @@ impl<T: ?Sized> *const T {
12181218
/// See [`ptr::copy_nonoverlapping`] for safety concerns and examples.
12191219
///
12201220
/// [`ptr::copy_nonoverlapping`]: crate::ptr::copy_nonoverlapping()
1221-
#[rustc_const_unstable(feature = "const_intrinsic_copy", issue = "80697")]
1221+
#[rustc_const_stable(feature = "const_intrinsic_copy", since = "1.63.0")]
12221222
#[stable(feature = "pointer_methods", since = "1.26.0")]
12231223
#[inline]
12241224
pub const unsafe fn copy_to_nonoverlapping(self, dest: *mut T, count: usize)

core/src/ptr/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1136,7 +1136,7 @@ pub const unsafe fn read<T>(src: *const T) -> T {
11361136
// We are calling the intrinsics directly to avoid function calls in the generated code
11371137
// as `intrinsics::copy_nonoverlapping` is a wrapper function.
11381138
extern "rust-intrinsic" {
1139-
#[rustc_const_unstable(feature = "const_intrinsic_copy", issue = "80697")]
1139+
#[rustc_const_stable(feature = "const_intrinsic_copy", since = "1.63.0")]
11401140
fn copy_nonoverlapping<T>(src: *const T, dst: *mut T, count: usize);
11411141
}
11421142

@@ -1331,7 +1331,7 @@ pub const unsafe fn write<T>(dst: *mut T, src: T) {
13311331
// We are calling the intrinsics directly to avoid function calls in the generated code
13321332
// as `intrinsics::copy_nonoverlapping` is a wrapper function.
13331333
extern "rust-intrinsic" {
1334-
#[rustc_const_unstable(feature = "const_intrinsic_copy", issue = "80697")]
1334+
#[rustc_const_stable(feature = "const_intrinsic_copy", since = "1.63.0")]
13351335
fn copy_nonoverlapping<T>(src: *const T, dst: *mut T, count: usize);
13361336
}
13371337

core/src/ptr/mut_ptr.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -1311,7 +1311,7 @@ impl<T: ?Sized> *mut T {
13111311
/// See [`ptr::copy`] for safety concerns and examples.
13121312
///
13131313
/// [`ptr::copy`]: crate::ptr::copy()
1314-
#[rustc_const_unstable(feature = "const_intrinsic_copy", issue = "80697")]
1314+
#[rustc_const_stable(feature = "const_intrinsic_copy", since = "1.63.0")]
13151315
#[stable(feature = "pointer_methods", since = "1.26.0")]
13161316
#[inline(always)]
13171317
pub const unsafe fn copy_to(self, dest: *mut T, count: usize)
@@ -1330,7 +1330,7 @@ impl<T: ?Sized> *mut T {
13301330
/// See [`ptr::copy_nonoverlapping`] for safety concerns and examples.
13311331
///
13321332
/// [`ptr::copy_nonoverlapping`]: crate::ptr::copy_nonoverlapping()
1333-
#[rustc_const_unstable(feature = "const_intrinsic_copy", issue = "80697")]
1333+
#[rustc_const_stable(feature = "const_intrinsic_copy", since = "1.63.0")]
13341334
#[stable(feature = "pointer_methods", since = "1.26.0")]
13351335
#[inline(always)]
13361336
pub const unsafe fn copy_to_nonoverlapping(self, dest: *mut T, count: usize)
@@ -1349,7 +1349,7 @@ impl<T: ?Sized> *mut T {
13491349
/// See [`ptr::copy`] for safety concerns and examples.
13501350
///
13511351
/// [`ptr::copy`]: crate::ptr::copy()
1352-
#[rustc_const_unstable(feature = "const_intrinsic_copy", issue = "80697")]
1352+
#[rustc_const_stable(feature = "const_intrinsic_copy", since = "1.63.0")]
13531353
#[stable(feature = "pointer_methods", since = "1.26.0")]
13541354
#[inline(always)]
13551355
pub const unsafe fn copy_from(self, src: *const T, count: usize)
@@ -1368,7 +1368,7 @@ impl<T: ?Sized> *mut T {
13681368
/// See [`ptr::copy_nonoverlapping`] for safety concerns and examples.
13691369
///
13701370
/// [`ptr::copy_nonoverlapping`]: crate::ptr::copy_nonoverlapping()
1371-
#[rustc_const_unstable(feature = "const_intrinsic_copy", issue = "80697")]
1371+
#[rustc_const_stable(feature = "const_intrinsic_copy", since = "1.63.0")]
13721372
#[stable(feature = "pointer_methods", since = "1.26.0")]
13731373
#[inline(always)]
13741374
pub const unsafe fn copy_from_nonoverlapping(self, src: *const T, count: usize)

core/tests/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,6 @@
8484
#![feature(const_option)]
8585
#![feature(const_option_ext)]
8686
#![feature(const_result)]
87-
#![feature(const_intrinsic_copy)]
8887
#![feature(integer_atomics)]
8988
#![feature(int_roundings)]
9089
#![feature(slice_group_by)]

0 commit comments

Comments
 (0)