Skip to content

Commit b2c1c8f

Browse files
committed
Stabilize std::io::ErrorKind::QuotaExceeded
Also drop "Filesystem" from its name
1 parent e561499 commit b2c1c8f

File tree

6 files changed

+10
-10
lines changed

6 files changed

+10
-10
lines changed

library/std/src/io/error.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -327,9 +327,9 @@ pub enum ErrorKind {
327327
/// example, on Unix, a named pipe opened with `File::open`.
328328
#[stable(feature = "io_error_a_bit_more", since = "CURRENT_RUSTC_VERSION")]
329329
NotSeekable,
330-
/// Filesystem quota was exceeded.
331-
#[unstable(feature = "io_error_more", issue = "86442")]
332-
FilesystemQuotaExceeded,
330+
/// Filesystem quota or some other kind of quota was exceeded.
331+
#[stable(feature = "io_error_quota_exceeded", since = "CURRENT_RUSTC_VERSION")]
332+
QuotaExceeded,
333333
/// File larger than allowed or supported.
334334
///
335335
/// This might arise from a hard limit of the underlying filesystem or file access API, or from
@@ -451,7 +451,7 @@ impl ErrorKind {
451451
ExecutableFileBusy => "executable file busy",
452452
FileTooLarge => "file too large",
453453
FilesystemLoop => "filesystem loop or indirection limit (e.g. symlink loop)",
454-
FilesystemQuotaExceeded => "filesystem quota exceeded",
454+
QuotaExceeded => "quota exceeded",
455455
HostUnreachable => "host unreachable",
456456
Interrupted => "operation interrupted",
457457
InProgress => "in progress",

library/std/src/io/error/repr_bitpacked.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ fn kind_from_prim(ek: u32) -> Option<ErrorKind> {
335335
WriteZero,
336336
StorageFull,
337337
NotSeekable,
338-
FilesystemQuotaExceeded,
338+
QuotaExceeded,
339339
FileTooLarge,
340340
ResourceBusy,
341341
ExecutableFileBusy,

library/std/src/sys/pal/teeos/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ pub fn decode_error_kind(errno: i32) -> ErrorKind {
6363
libc::ECONNREFUSED => ConnectionRefused,
6464
libc::ECONNRESET => ConnectionReset,
6565
libc::EDEADLK => Deadlock,
66-
libc::EDQUOT => FilesystemQuotaExceeded,
66+
libc::EDQUOT => QuotaExceeded,
6767
libc::EEXIST => AlreadyExists,
6868
libc::EFBIG => FileTooLarge,
6969
libc::EHOSTUNREACH => HostUnreachable,

library/std/src/sys/pal/unix/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ pub fn decode_error_kind(errno: i32) -> ErrorKind {
253253
libc::ECONNREFUSED => ConnectionRefused,
254254
libc::ECONNRESET => ConnectionReset,
255255
libc::EDEADLK => Deadlock,
256-
libc::EDQUOT => FilesystemQuotaExceeded,
256+
libc::EDQUOT => QuotaExceeded,
257257
libc::EEXIST => AlreadyExists,
258258
libc::EFBIG => FileTooLarge,
259259
libc::EHOSTUNREACH => HostUnreachable,

library/std/src/sys/pal/windows/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ pub fn decode_error_kind(errno: i32) -> ErrorKind {
113113
c::ERROR_WRITE_PROTECT => return ReadOnlyFilesystem,
114114
c::ERROR_DISK_FULL | c::ERROR_HANDLE_DISK_FULL => return StorageFull,
115115
c::ERROR_SEEK_ON_DEVICE => return NotSeekable,
116-
c::ERROR_DISK_QUOTA_EXCEEDED => return FilesystemQuotaExceeded,
116+
c::ERROR_DISK_QUOTA_EXCEEDED => return QuotaExceeded,
117117
c::ERROR_FILE_TOO_LARGE => return FileTooLarge,
118118
c::ERROR_BUSY => return ResourceBusy,
119119
c::ERROR_POSSIBLE_DEADLOCK => return Deadlock,
@@ -138,7 +138,7 @@ pub fn decode_error_kind(errno: i32) -> ErrorKind {
138138
c::WSAEHOSTUNREACH => HostUnreachable,
139139
c::WSAENETDOWN => NetworkDown,
140140
c::WSAENETUNREACH => NetworkUnreachable,
141-
c::WSAEDQUOT => FilesystemQuotaExceeded,
141+
c::WSAEDQUOT => QuotaExceeded,
142142

143143
_ => Uncategorized,
144144
}

src/tools/miri/src/shims/io_error.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ const UNIX_IO_ERROR_TABLE: &[(&str, std::io::ErrorKind)] = {
4343
("ECONNREFUSED", ConnectionRefused),
4444
("ECONNRESET", ConnectionReset),
4545
("EDEADLK", Deadlock),
46-
("EDQUOT", FilesystemQuotaExceeded),
46+
("EDQUOT", QuotaExceeded),
4747
("EEXIST", AlreadyExists),
4848
("EFBIG", FileTooLarge),
4949
("EHOSTUNREACH", HostUnreachable),

0 commit comments

Comments
 (0)