forked from model-checking/verify-rust-std
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of rust-lang#130762 - RalfJung:const_intrinsic_copy, r=d…
…tolnay stabilize const_intrinsic_copy Fixes rust-lang#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#117905, which reverted rust-lang#97276. The `NonNull` methods are not listed in the tracking issue, they were added to this feature gate in rust-lang#124498. The existing [FCP](rust-lang#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.
- Loading branch information
Showing
8 changed files
with
15 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters