rust/library/std/src/sys/unsupported
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 mv std libs to library/ 2020-07-27 19:51:13 -05:00
args.rs Fix missing import in unsupported::args 2021-04-28 16:16:01 +02:00
common.rs Rename ErrorKind::Unknown to Uncategorized. 2021-06-15 14:30:13 +02:00
condvar.rs No longer put condvars on the 'unsupported' platform in a box. 2020-10-02 09:47:08 +02:00
env.rs mv std libs to library/ 2020-07-27 19:51:13 -05:00
fs.rs Move the implementation of Path::exists to sys_common::fs so platforms can specialize it 2021-05-19 23:54:56 +01:00
io.rs mv std libs to library/ 2020-07-27 19:51:13 -05:00
mod.rs Auto merge of #84522 - CDirkx:cmath, r=yaahc 2021-04-30 09:52:32 +00:00
mutex.rs Rollup merge of #77722 - fusion-engineering-forks:safe-unsupported-locks, r=Mark-Simulacrum 2020-10-14 06:02:21 +09:00
net.rs Change uses of never type 2021-04-20 20:53:07 +02:00
os.rs Change uses of never type 2021-04-20 20:53:07 +02:00
pipe.rs Change uses of never type 2021-04-20 20:53:07 +02:00
process.rs Provide ExitStatusError 2021-05-12 11:12:19 +01:00
rwlock.rs Multiple improvements to RwLocks 2021-06-01 09:07:55 +02:00
stdio.rs Make raw standard stream constructors const 2020-08-21 13:17:20 +02:00
thread_local_dtor.rs mv std libs to library/ 2020-07-27 19:51:13 -05:00
thread_local_key.rs mv std libs to library/ 2020-07-27 19:51:13 -05:00
thread.rs Use Unsupported on platforms where available_concurrency is not implemented. 2021-06-21 11:31:07 +02:00
time.rs mv std libs to library/ 2020-07-27 19:51:13 -05:00