rust/library/std/src/sys/wasi
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
..
args.rs Auto merge of #84115 - CDirkx:rt, r=m-ou-se 2021-04-25 04:45:39 +00:00
env.rs mv std libs to library/ 2020-07-27 19:51:13 -05:00
fd.rs Applied #![deny(unsafe_op_in_unsafe_fn)] in library/std/src/wasi 2020-09-03 08:27:59 +08:00
fs.rs Rename ErrorKind::Unknown to Uncategorized. 2021-06-15 14:30:13 +02:00
io.rs Applied #![deny(unsafe_op_in_unsafe_fn)] in library/std/src/wasi 2020-09-03 08:27:59 +08:00
mod.rs Rename ErrorKind::Unknown to Uncategorized. 2021-06-15 14:30:13 +02:00
net.rs Change uses of never type 2021-04-20 20:53:07 +02:00
os.rs Explicitly implement !Send and !Sync for sys::{Args, Env} 2021-04-23 00:15:35 +02:00
stdio.rs x.py fmt 2021-02-24 10:58:21 -08:00
thread.rs Use Unsupported on platforms where available_concurrency is not implemented. 2021-06-21 11:31:07 +02:00
time.rs Applied #![deny(unsafe_op_in_unsafe_fn)] in library/std/src/wasi 2020-09-03 08:27:59 +08:00