[WIP]: Move std::io::Error into core#155625
Draft
bushrat011899 wants to merge 4 commits intorust-lang:mainfrom
Draft
[WIP]: Move std::io::Error into core#155625bushrat011899 wants to merge 4 commits intorust-lang:mainfrom
std::io::Error into core#155625bushrat011899 wants to merge 4 commits intorust-lang:mainfrom
Conversation
The hyperlink to `std::io::Error` will not be valid when moved to `core::io`. There is also a typo which I might as well fix while I'm here.
Inconsistently referenced through `std::sys` and `std::io`. Choosing `std::io` as the canonical source to make migration to `core::io` cleaner.
This comment has been minimized.
This comment has been minimized.
b86f41f to
c538e5d
Compare
This comment has been minimized.
This comment has been minimized.
6c37f53 to
65d4011
Compare
This comment has been minimized.
This comment has been minimized.
65d4011 to
56a8e8c
Compare
93b1fa3 to
d3835aa
Compare
This comment has been minimized.
This comment has been minimized.
Member
|
example of how to link from |
d3835aa to
8bfceb6
Compare
Contributor
Author
That's a clever trick I never knew about! Looks like it's also required for linking to incoherent implementations even within the file that creates them too. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
8bfceb6 to
96864eb
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
96864eb to
7cad458
Compare
This comment has been minimized.
This comment has been minimized.
Member
maybe just leave it until you get the PR to work, that way there's less comment spam. |
This comment has been minimized.
This comment has been minimized.
7cad458 to
0f0a783
Compare
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.
ACP: rust-lang/libs-team#755
Tracking issue: #154046
Related: #155574
Related: #152918
Description
Moves
std::io::Errorintocore, deferringBox-adjacent methods to incoherent implementations inalloc, andRawOsErrormethods tostd. This requires some substantial changes to the internals ofError, but none of them are breaking changes or externally visible.Notably, I've replaced usage of
Boxwith a wrapper around a pointer and an appropriate drop function. This requires the addition of quite a few lines of unsafe, but is required to work aroundBoxonly being accessible fromalloc. Additionally, an atomic pointer to a VTable is used for working withRawOsErrorincore, since we cannot know the required implementations withoutstd.To-Do
std::io::Error(and friends) intocore, leaving incoherent implementations behind inalloc::ioandstd::io.Created as a WIP as I would like to split the various steps of this effort into smaller, less controversial PRs, such as #155574.
Notes
std::iotoalloc#152918std::io::RawOsErrortocore::io#155574