Skip to content

Commit cf163c9

Browse files
Rollup merge of #130762 - RalfJung:const_intrinsic_copy, r=dtolnay
stabilize const_intrinsic_copy Fixes rust-lang/rust#80697 This stabilizes ```rust mod ptr { pub const unsafe fn copy_nonoverlapping<T>(src: *const T, dst: *mut T, count: usize); pub const unsafe fn copy<T>(src: *const T, dst: *mut T, count: usize); } impl *const T { pub const unsafe fn copy_to(self, dest: *mut T, count: usize); pub const unsafe fn copy_to_nonoverlapping(self, dest: *mut T, count: usize); } impl *mut T { pub const unsafe fn copy_to(self, dest: *mut T, count: usize); pub const unsafe fn copy_to_nonoverlapping(self, dest: *mut T, count: usize); pub const unsafe fn copy_from(self, src: *const T, count: usize); pub const unsafe fn copy_from_nonoverlapping(self, src: *const T, count: usize); } impl <T> NonNull<T> { pub const unsafe fn copy_to(self, dest: NonNull<T>, count: usize); pub const unsafe fn copy_to_nonoverlapping(self, dest: NonNull<T>, count: usize); pub const unsafe fn copy_from(self, src: NonNull<T>, count: usize); pub const unsafe fn copy_from_nonoverlapping(self, src: NonNull<T>, count: usize); } ``` In particular, this reverts rust-lang/rust#117905, which reverted rust-lang/rust#97276. The `NonNull` methods are not listed in the tracking issue, they were added to this feature gate in rust-lang/rust#124498. The existing [FCP](rust-lang/rust#80697 (comment)) does not cover them. They are however entirely identical to the `*mut` methods and already stable outside `const`. ``@rust-lang/libs-api`` please let me know if FCP will be required for the `NonNull` methods.
2 parents 749577a + 6980aaf commit cf163c9

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

crates/core_simd/src/lib.rs

Lines changed: 0 additions & 2 deletions
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)