Move IoSlice and IoSliceMut to core::io#155849
Open
bushrat011899 wants to merge 1 commit intorust-lang:mainfrom
Open
Move IoSlice and IoSliceMut to core::io#155849bushrat011899 wants to merge 1 commit intorust-lang:mainfrom
IoSlice and IoSliceMut to core::io#155849bushrat011899 wants to merge 1 commit intorust-lang:mainfrom
Conversation
Collaborator
|
r? @jhpratt rustbot has assigned @jhpratt. Use Why was this reviewer chosen?The reviewer was selected based on:
|
This comment has been minimized.
This comment has been minimized.
227cc04 to
868ecad
Compare
This comment has been minimized.
This comment has been minimized.
868ecad to
37093d7
Compare
Contributor
|
a long awating staff, thanks. |
This comment has been minimized.
This comment has been minimized.
37093d7 to
987b7d7
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
987b7d7 to
5f6ae4a
Compare
4 tasks
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
View all comments
ACP: rust-lang/libs-team#755
Tracking issue: #154046
Related: #152918
Related: #155625
Description
Moves
std::io::IoSliceandstd::io::IoSliceMutintocore::io. This is required for theReadandWritetraits to be moved intoallocand/orcore, as they contain stable methods which work with IO slices. Similar to #155574, this PR inlines thestd::systypes required to create an ABI compatible type for the platforms where such compatibility is guaranteed.Additionally, I've moved the relevant tests out of
std::io::testsintocoretests::io::io_slice.Notes
std::iotoalloc#152918, but goes further than moving the IO slice types toallocand instead moves them straight tocore. Since these types have no interaction with allocation, and doing so will allowWriteto move tocore::io, I consider this a better home for these types.core::sysmodule can be found here.unsupportedtogenericto better reflect thatIoSlice(Mut)is supported by all platforms, it just doesn't have a special ABI-compatible type. I don't want to imply that parts ofcore"don't work" depending on the target;IoSlice(Mut)works exactly as expected on all targets.pubitems within each platform-specific representationpub(super)to highlight that everything withincore::io::io_sliceis an internal implementation detail not meant for any other part of the crate to be aware of.