mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 06:44:35 +00:00
Rollup merge of #128316 - GrigorenkoPV:io_error_a_bit_more, r=dtolnay
Stabilize most of `io_error_more` Sadly, venting my frustration with t-libs-api is not a constructive way to solve problems and get things done, so I will try to stick to stuff that actually matters here. - Tracking issue for this feature was opened 3 years ago: #86442 - FCP to stabilize it was completed 19(!!) months ago: https://github.com/rust-lang/rust/issues/86442#issuecomment-1368082102 - A PR with stabilization was similarly open for 19 months: #106375, but nothing ever came out of it. Presumably (it is hard to judge given the lack of communication) because a few of the variants still had some concerns voiced about them, even after the FCP. So, to highlight a common sentiment: > Maybe uncontroversial variants can be stabilised first and other variants (such as `QuotaExceeded` or `FilesystemLoop`) later? [^1] [^1]: https://github.com/rust-lang/rust/issues/106375#issuecomment-1435762236 > I would like to voice support stabilization of the uncontroversial variants. This would get those variants to stable and focus the discussion around the more controversial ones. I don't see any particular reason that all of these must be stabilized at the same time. [...] [^2] [^2]: https://github.com/rust-lang/rust/pull/106375#issuecomment-1742661555 > Maybe some less-controversial subset could be stabilized sooner? What’s blocking this issue from making progress? [^3] [^3]: https://github.com/rust-lang/rust/issues/86442#issuecomment-1691187483 (got 30 upvotes btw) (and no response) So this is exactly what this PR does. It stabilizes the non-controversial variants now, leaving just a few of them behind. Namely, this PR stabilizes: - `HostUnreachable` - `NetworkUnreachable` - `NetworkDown` - `NotADirectory` - `IsADirectory` - `DirectoryNotEmpty` - `ReadOnlyFilesystem` - `StaleNetworkFileHandle` - `StorageFull` - `NotSeekable` - `FileTooLarge` - `ResourceBusy` - `ExecutableFileBusy` - `Deadlock` - `TooManyLinks` - `ArgumentListTooLong` - `Unsupported` This PR does not stabilize: - `FilesystemLoop` - `FilesystemQuotaExceeded` - `CrossesDevices` - `InvalidFilename` Hopefully, this will allow us to move forward with this highly and long awaited addition to std, both allowing to still polish the less clear parts of it and not leading to stagnation. r? joshtriplett because they seem to be listed as a part of t-libs-api and were one of the most responsive persons previously
This commit is contained in:
commit
1392965e05
@ -223,10 +223,10 @@ pub enum ErrorKind {
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
ConnectionReset,
|
||||
/// The remote host is not reachable.
|
||||
#[unstable(feature = "io_error_more", issue = "86442")]
|
||||
#[stable(feature = "io_error_a_bit_more", since = "CURRENT_RUSTC_VERSION")]
|
||||
HostUnreachable,
|
||||
/// The network containing the remote host is not reachable.
|
||||
#[unstable(feature = "io_error_more", issue = "86442")]
|
||||
#[stable(feature = "io_error_a_bit_more", since = "CURRENT_RUSTC_VERSION")]
|
||||
NetworkUnreachable,
|
||||
/// The connection was aborted (terminated) by the remote server.
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
@ -243,7 +243,7 @@ pub enum ErrorKind {
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
AddrNotAvailable,
|
||||
/// The system's networking is down.
|
||||
#[unstable(feature = "io_error_more", issue = "86442")]
|
||||
#[stable(feature = "io_error_a_bit_more", since = "CURRENT_RUSTC_VERSION")]
|
||||
NetworkDown,
|
||||
/// The operation failed because a pipe was closed.
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
@ -259,18 +259,18 @@ pub enum ErrorKind {
|
||||
///
|
||||
/// For example, a filesystem path was specified where one of the intermediate directory
|
||||
/// components was, in fact, a plain file.
|
||||
#[unstable(feature = "io_error_more", issue = "86442")]
|
||||
#[stable(feature = "io_error_a_bit_more", since = "CURRENT_RUSTC_VERSION")]
|
||||
NotADirectory,
|
||||
/// The filesystem object is, unexpectedly, a directory.
|
||||
///
|
||||
/// A directory was specified when a non-directory was expected.
|
||||
#[unstable(feature = "io_error_more", issue = "86442")]
|
||||
#[stable(feature = "io_error_a_bit_more", since = "CURRENT_RUSTC_VERSION")]
|
||||
IsADirectory,
|
||||
/// A non-empty directory was specified where an empty directory was expected.
|
||||
#[unstable(feature = "io_error_more", issue = "86442")]
|
||||
#[stable(feature = "io_error_a_bit_more", since = "CURRENT_RUSTC_VERSION")]
|
||||
DirectoryNotEmpty,
|
||||
/// The filesystem or storage medium is read-only, but a write operation was attempted.
|
||||
#[unstable(feature = "io_error_more", issue = "86442")]
|
||||
#[stable(feature = "io_error_a_bit_more", since = "CURRENT_RUSTC_VERSION")]
|
||||
ReadOnlyFilesystem,
|
||||
/// Loop in the filesystem or IO subsystem; often, too many levels of symbolic links.
|
||||
///
|
||||
@ -285,7 +285,7 @@ pub enum ErrorKind {
|
||||
///
|
||||
/// With some network filesystems, notably NFS, an open file (or directory) can be invalidated
|
||||
/// by problems with the network or server.
|
||||
#[unstable(feature = "io_error_more", issue = "86442")]
|
||||
#[stable(feature = "io_error_a_bit_more", since = "CURRENT_RUSTC_VERSION")]
|
||||
StaleNetworkFileHandle,
|
||||
/// A parameter was incorrect.
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
@ -319,13 +319,13 @@ pub enum ErrorKind {
|
||||
/// The underlying storage (typically, a filesystem) is full.
|
||||
///
|
||||
/// This does not include out of quota errors.
|
||||
#[unstable(feature = "io_error_more", issue = "86442")]
|
||||
#[stable(feature = "io_error_a_bit_more", since = "CURRENT_RUSTC_VERSION")]
|
||||
StorageFull,
|
||||
/// Seek on unseekable file.
|
||||
///
|
||||
/// Seeking was attempted on an open file handle which is not suitable for seeking - for
|
||||
/// example, on Unix, a named pipe opened with `File::open`.
|
||||
#[unstable(feature = "io_error_more", issue = "86442")]
|
||||
#[stable(feature = "io_error_a_bit_more", since = "CURRENT_RUSTC_VERSION")]
|
||||
NotSeekable,
|
||||
/// Filesystem quota was exceeded.
|
||||
#[unstable(feature = "io_error_more", issue = "86442")]
|
||||
@ -335,22 +335,22 @@ pub enum ErrorKind {
|
||||
/// This might arise from a hard limit of the underlying filesystem or file access API, or from
|
||||
/// an administratively imposed resource limitation. Simple disk full, and out of quota, have
|
||||
/// their own errors.
|
||||
#[unstable(feature = "io_error_more", issue = "86442")]
|
||||
#[stable(feature = "io_error_a_bit_more", since = "CURRENT_RUSTC_VERSION")]
|
||||
FileTooLarge,
|
||||
/// Resource is busy.
|
||||
#[unstable(feature = "io_error_more", issue = "86442")]
|
||||
#[stable(feature = "io_error_a_bit_more", since = "CURRENT_RUSTC_VERSION")]
|
||||
ResourceBusy,
|
||||
/// Executable file is busy.
|
||||
///
|
||||
/// An attempt was made to write to a file which is also in use as a running program. (Not all
|
||||
/// operating systems detect this situation.)
|
||||
#[unstable(feature = "io_error_more", issue = "86442")]
|
||||
#[stable(feature = "io_error_a_bit_more", since = "CURRENT_RUSTC_VERSION")]
|
||||
ExecutableFileBusy,
|
||||
/// Deadlock (avoided).
|
||||
///
|
||||
/// A file locking operation would result in deadlock. This situation is typically detected, if
|
||||
/// at all, on a best-effort basis.
|
||||
#[unstable(feature = "io_error_more", issue = "86442")]
|
||||
#[stable(feature = "io_error_a_bit_more", since = "CURRENT_RUSTC_VERSION")]
|
||||
Deadlock,
|
||||
/// Cross-device or cross-filesystem (hard) link or rename.
|
||||
#[unstable(feature = "io_error_more", issue = "86442")]
|
||||
@ -358,7 +358,7 @@ pub enum ErrorKind {
|
||||
/// Too many (hard) links to the same filesystem object.
|
||||
///
|
||||
/// The filesystem does not support making so many hardlinks to the same file.
|
||||
#[unstable(feature = "io_error_more", issue = "86442")]
|
||||
#[stable(feature = "io_error_a_bit_more", since = "CURRENT_RUSTC_VERSION")]
|
||||
TooManyLinks,
|
||||
/// A filename was invalid.
|
||||
///
|
||||
@ -369,7 +369,7 @@ pub enum ErrorKind {
|
||||
///
|
||||
/// When trying to run an external program, a system or process limit on the size of the
|
||||
/// arguments would have been exceeded.
|
||||
#[unstable(feature = "io_error_more", issue = "86442")]
|
||||
#[stable(feature = "io_error_a_bit_more", since = "CURRENT_RUSTC_VERSION")]
|
||||
ArgumentListTooLong,
|
||||
/// This operation was interrupted.
|
||||
///
|
||||
|
Loading…
Reference in New Issue
Block a user