Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit ec7fd8a

Browse files
authoredSep 10, 2024
Rollup merge of rust-lang#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: rust-lang#86442 - FCP to stabilize it was completed 19(!!) months ago: rust-lang#86442 (comment) - A PR with stabilization was similarly open for 19 months: rust-lang#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]: rust-lang#106375 (comment) > 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]: rust-lang#106375 (comment) > Maybe some less-controversial subset could be stabilized sooner? What’s blocking this issue from making progress? [^3] [^3]: rust-lang#86442 (comment) (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
2 parents f7b7aa3 + 8744732 commit ec7fd8a

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed
 

‎std/src/io/error.rs

+16-16
Original file line numberDiff line numberDiff line change
@@ -223,10 +223,10 @@ pub enum ErrorKind {
223223
#[stable(feature = "rust1", since = "1.0.0")]
224224
ConnectionReset,
225225
/// The remote host is not reachable.
226-
#[unstable(feature = "io_error_more", issue = "86442")]
226+
#[stable(feature = "io_error_a_bit_more", since = "CURRENT_RUSTC_VERSION")]
227227
HostUnreachable,
228228
/// The network containing the remote host is not reachable.
229-
#[unstable(feature = "io_error_more", issue = "86442")]
229+
#[stable(feature = "io_error_a_bit_more", since = "CURRENT_RUSTC_VERSION")]
230230
NetworkUnreachable,
231231
/// The connection was aborted (terminated) by the remote server.
232232
#[stable(feature = "rust1", since = "1.0.0")]
@@ -243,7 +243,7 @@ pub enum ErrorKind {
243243
#[stable(feature = "rust1", since = "1.0.0")]
244244
AddrNotAvailable,
245245
/// The system's networking is down.
246-
#[unstable(feature = "io_error_more", issue = "86442")]
246+
#[stable(feature = "io_error_a_bit_more", since = "CURRENT_RUSTC_VERSION")]
247247
NetworkDown,
248248
/// The operation failed because a pipe was closed.
249249
#[stable(feature = "rust1", since = "1.0.0")]
@@ -259,18 +259,18 @@ pub enum ErrorKind {
259259
///
260260
/// For example, a filesystem path was specified where one of the intermediate directory
261261
/// components was, in fact, a plain file.
262-
#[unstable(feature = "io_error_more", issue = "86442")]
262+
#[stable(feature = "io_error_a_bit_more", since = "CURRENT_RUSTC_VERSION")]
263263
NotADirectory,
264264
/// The filesystem object is, unexpectedly, a directory.
265265
///
266266
/// A directory was specified when a non-directory was expected.
267-
#[unstable(feature = "io_error_more", issue = "86442")]
267+
#[stable(feature = "io_error_a_bit_more", since = "CURRENT_RUSTC_VERSION")]
268268
IsADirectory,
269269
/// A non-empty directory was specified where an empty directory was expected.
270-
#[unstable(feature = "io_error_more", issue = "86442")]
270+
#[stable(feature = "io_error_a_bit_more", since = "CURRENT_RUSTC_VERSION")]
271271
DirectoryNotEmpty,
272272
/// The filesystem or storage medium is read-only, but a write operation was attempted.
273-
#[unstable(feature = "io_error_more", issue = "86442")]
273+
#[stable(feature = "io_error_a_bit_more", since = "CURRENT_RUSTC_VERSION")]
274274
ReadOnlyFilesystem,
275275
/// Loop in the filesystem or IO subsystem; often, too many levels of symbolic links.
276276
///
@@ -285,7 +285,7 @@ pub enum ErrorKind {
285285
///
286286
/// With some network filesystems, notably NFS, an open file (or directory) can be invalidated
287287
/// by problems with the network or server.
288-
#[unstable(feature = "io_error_more", issue = "86442")]
288+
#[stable(feature = "io_error_a_bit_more", since = "CURRENT_RUSTC_VERSION")]
289289
StaleNetworkFileHandle,
290290
/// A parameter was incorrect.
291291
#[stable(feature = "rust1", since = "1.0.0")]
@@ -319,13 +319,13 @@ pub enum ErrorKind {
319319
/// The underlying storage (typically, a filesystem) is full.
320320
///
321321
/// This does not include out of quota errors.
322-
#[unstable(feature = "io_error_more", issue = "86442")]
322+
#[stable(feature = "io_error_a_bit_more", since = "CURRENT_RUSTC_VERSION")]
323323
StorageFull,
324324
/// Seek on unseekable file.
325325
///
326326
/// Seeking was attempted on an open file handle which is not suitable for seeking - for
327327
/// example, on Unix, a named pipe opened with `File::open`.
328-
#[unstable(feature = "io_error_more", issue = "86442")]
328+
#[stable(feature = "io_error_a_bit_more", since = "CURRENT_RUSTC_VERSION")]
329329
NotSeekable,
330330
/// Filesystem quota was exceeded.
331331
#[unstable(feature = "io_error_more", issue = "86442")]
@@ -335,30 +335,30 @@ pub enum ErrorKind {
335335
/// This might arise from a hard limit of the underlying filesystem or file access API, or from
336336
/// an administratively imposed resource limitation. Simple disk full, and out of quota, have
337337
/// their own errors.
338-
#[unstable(feature = "io_error_more", issue = "86442")]
338+
#[stable(feature = "io_error_a_bit_more", since = "CURRENT_RUSTC_VERSION")]
339339
FileTooLarge,
340340
/// Resource is busy.
341-
#[unstable(feature = "io_error_more", issue = "86442")]
341+
#[stable(feature = "io_error_a_bit_more", since = "CURRENT_RUSTC_VERSION")]
342342
ResourceBusy,
343343
/// Executable file is busy.
344344
///
345345
/// An attempt was made to write to a file which is also in use as a running program. (Not all
346346
/// operating systems detect this situation.)
347-
#[unstable(feature = "io_error_more", issue = "86442")]
347+
#[stable(feature = "io_error_a_bit_more", since = "CURRENT_RUSTC_VERSION")]
348348
ExecutableFileBusy,
349349
/// Deadlock (avoided).
350350
///
351351
/// A file locking operation would result in deadlock. This situation is typically detected, if
352352
/// at all, on a best-effort basis.
353-
#[unstable(feature = "io_error_more", issue = "86442")]
353+
#[stable(feature = "io_error_a_bit_more", since = "CURRENT_RUSTC_VERSION")]
354354
Deadlock,
355355
/// Cross-device or cross-filesystem (hard) link or rename.
356356
#[unstable(feature = "io_error_more", issue = "86442")]
357357
CrossesDevices,
358358
/// Too many (hard) links to the same filesystem object.
359359
///
360360
/// The filesystem does not support making so many hardlinks to the same file.
361-
#[unstable(feature = "io_error_more", issue = "86442")]
361+
#[stable(feature = "io_error_a_bit_more", since = "CURRENT_RUSTC_VERSION")]
362362
TooManyLinks,
363363
/// A filename was invalid.
364364
///
@@ -369,7 +369,7 @@ pub enum ErrorKind {
369369
///
370370
/// When trying to run an external program, a system or process limit on the size of the
371371
/// arguments would have been exceeded.
372-
#[unstable(feature = "io_error_more", issue = "86442")]
372+
#[stable(feature = "io_error_a_bit_more", since = "CURRENT_RUSTC_VERSION")]
373373
ArgumentListTooLong,
374374
/// This operation was interrupted.
375375
///

0 commit comments

Comments
 (0)
Failed to load comments.