Migrate libraries from ptr::slice_from_raw_parts to .cast_slice#156109
Migrate libraries from ptr::slice_from_raw_parts to .cast_slice#156109Paladynee wants to merge 1 commit intorust-lang:mainfrom
Conversation
|
cc @Amanieu, @folkertdev, @sayantn |
|
r? @jhpratt rustbot has assigned @jhpratt. Use Why was this reviewer chosen?The reviewer was selected based on:
|
|
some notable places like core::slice::from_raw_parts have not been updated, because i felt like changing that would harm readability than improving it. |
This comment has been minimized.
This comment has been minimized.
|
hmm wait let me revert that doc change, apparently it is exactly the same in |
This comment has been minimized.
This comment has been minimized.
5533d7b to
fced58f
Compare
|
Could |
Aside from this, |
|
@rustbot author |
|
Reminder, once the PR becomes ready for a review, use |
i believe they are equivalent other than the debug UB assertion, yes |
|
I'm not touching anything in;
with that, i think this pr is ready @rustbot ready |
fced58f to
e030a3f
Compare
The |
e030a3f to
14315f9
Compare
done |
Tracking issue for
#![feature(ptr_cast_slice)]: #149103This commit updates most callsites of ptr::slice_from_raw_parts within ./library to the more concise but unstable postfix
.cast_slice()method on raw pointers, using theptr_cast_slicefeature. Some tests in alloctests have also been updated.No functional change, debatably improved readability.