Move std::io::ErrorKind to core::io#154654
Move std::io::ErrorKind to core::io#154654bushrat011899 wants to merge 6 commits intorust-lang:mainfrom
std::io::ErrorKind to core::io#154654Conversation
|
rustbot has assigned @Mark-Simulacrum. Use Why was this reviewer chosen?The reviewer was selected based on:
|
This comment has been minimized.
This comment has been minimized.
6acf3fc to
0c00e70
Compare
This comment has been minimized.
This comment has been minimized.
0c00e70 to
a87a02a
Compare
This comment has been minimized.
This comment has been minimized.
8faa574 to
0ef55d6
Compare
This comment has been minimized.
This comment has been minimized.
0ef55d6 to
3e16c8b
Compare
This comment has been minimized.
This comment has been minimized.
3e16c8b to
56dfe2e
Compare
This comment has been minimized.
This comment has been minimized.
56dfe2e to
aa24135
Compare
This comment has been minimized.
This comment has been minimized.
aa24135 to
f25b166
Compare
This comment has been minimized.
This comment has been minimized.
f25b166 to
94753ea
Compare
Certain links will not be valid when moved into `core::io`
* Checking exhaustion will no longer be possible for `repr_bitpacked`. We can rely on `non_exhaustive_omitted_patterns` to maintain the exhaustive property for us instead. * `ErrorKind::as_str` is private, but it's only usage is trivially replaced with `Display::fmt` * The features io_error_inprogress, io_error_more, and io_error_uncategorized will all need to be enabled
* Update `rustdoc-html` tests for the new path * Add `core_io_error_kind` feature to control stability * Re-export `core::io::ErrorKind` in `std::io::error`
94753ea to
b0ce24e
Compare
It may be controversial, but it has been accepted in principle by libs-teams, so it should be fine. |
I hope so! I really want your PR to land. Regardless of whether it does, this is a good follow-up to go further at basically no cost. |
|
looks good to me |
|
Reminder, once the PR becomes ready for a review, use |
Remade as an associated function that is hidden and perma-unstable
More descriptive
This comment has been minimized.
This comment has been minimized.
c690493 to
16624a6
Compare
This comment has been minimized.
This comment has been minimized.
Both `io_error_kind_in_core` and `core_io_borrowed_buf` require an unstable `core::io` module, but there is no way to make a module unstable and activated by `any(...)`
16624a6 to
70e9804
Compare
|
@rustbot ready |
View all comments
ACP: rust-lang/libs-team#755
Tracking issue: #154046
Related: #152918
Description
I consider #154046 to be really important for
no_std, but I'm concerned #152918 might be too controversial. As an alternative, I'd like to propose starting small withErrorKind, since it can be moved somewhat trivially. It has no dependencies on functionality instd, no platform specific behaviour, and could provide an excellent bridging point forno_stdIO libraries.Since
std::io::ErrorimplementsFrom<ErrorKind>, libraries could write functions which returnResult<T, core::io::ErrorKind>, and therefore be usable instd-using libraries with the?operator. For that reason, I'd consider this to be a worthwhile change even if the rest ofstd::iocouldn't be moved tocore/alloc, and entirely compatible with any efforts to make such a change in the future.Notes