rust/library/std/src/net
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
..
addr Remove redundant 'static from library crates 2020-10-18 17:25:51 +02:00
ip Remove is_unicast_site_local 2021-06-09 09:41:29 +02:00
parser Disallow octal format in Ipv4 string 2021-03-30 10:24:23 +08:00
tcp Rename ErrorKind::Unknown to Uncategorized. 2021-06-15 14:30:13 +02:00
udp Use is_ok() instead of empty Ok(_) 2020-10-13 17:01:50 -04:00
addr.rs Rollup merge of #82487 - CDirkx:const-socketaddr, r=m-ou-se 2021-04-04 00:19:30 +09:00
ip.rs Use HTTPS links where possible 2021-06-23 16:26:46 -04:00
mod.rs Use io::Error::new_const everywhere to avoid allocations. 2021-03-21 20:22:38 +01:00
parser.rs Disallow octal format in Ipv4 string 2021-03-30 10:24:23 +08:00
tcp.rs Drop support for cloudabi targets 2020-11-22 17:11:41 -05:00
test.rs mv std libs to library/ 2020-07-27 19:51:13 -05:00
udp.rs Add link to Issue #34202 in udp docs 2021-05-02 19:13:41 -04:00