rust/library/std/src/sys/hermit
bors f9fa13f705 Auto merge of #85746 - m-ou-se:io-error-other, r=joshtriplett
Redefine `ErrorKind::Other` and stop using it in std.

This implements the idea I shared yesterday in the libs meeting when we were discussing how to handle adding new `ErrorKind`s to the standard library: This redefines `Other` to be for *user defined errors only*, and changes all uses of `Other` in the standard library to a `#[doc(hidden)]` and permanently `#[unstable]` `ErrorKind` that users can not match on. This ensures that adding `ErrorKind`s at a later point in time is not a breaking change, since the user couldn't match on these errors anyway. This way, we use the `#[non_exhaustive]` property of the enum in a more effective way.

Open questions:
- How do we check this change doesn't cause too much breakage? Will a crate run help and be enough?
- How do we ensure we don't accidentally start using `Other` again in the standard library? We don't have a `pub(not crate)` or `#[deprecated(in this crate only)]`.

cc https://github.com/rust-lang/rust/pull/79965

cc `@rust-lang/libs` `@ijackson`

r? `@dtolnay`
2021-07-02 09:01:42 +00:00
..
alloc.rs Remove #![allow(unsafe_op_in_unsafe_fn)] except for mod.rs 2020-10-08 22:13:19 +09:00
args.rs Move OsStringExt and OsStrExt to std::os 2021-06-20 11:55:01 +02:00
condvar.rs Remove #![allow(unsafe_op_in_unsafe_fn)] except for mod.rs 2020-10-08 22:13:19 +09:00
env.rs mv std libs to library/ 2020-07-27 19:51:13 -05:00
fd.rs Use NotSupported in more places 2021-04-18 09:29:23 +02:00
fs.rs Move OsStringExt and OsStrExt to std::os 2021-06-20 11:55:01 +02:00
memchr.rs mv std libs to library/ 2020-07-27 19:51:13 -05:00
mod.rs Rename ErrorKind::Unknown to Uncategorized. 2021-06-15 14:30:13 +02:00
mutex.rs Fix a few misspellings. 2021-06-25 13:18:56 -07:00
net.rs Rename ErrorKind::Unknown to Uncategorized. 2021-06-15 14:30:13 +02:00
os.rs Move OsStringExt and OsStrExt to std::os 2021-06-20 11:55:01 +02:00
rwlock.rs Multiple improvements to RwLocks 2021-06-01 09:07:55 +02:00
stdio.rs Rename ErrorKind::Unknown to Uncategorized. 2021-06-15 14:30:13 +02:00
thread.rs Auto merge of #85746 - m-ou-se:io-error-other, r=joshtriplett 2021-07-02 09:01:42 +00:00
thread_local_dtor.rs Remove #![allow(unsafe_op_in_unsafe_fn)] except for mod.rs 2020-10-08 22:13:19 +09:00
time.rs mv std libs to library/ 2020-07-27 19:51:13 -05:00