Skip to content

Commit 004b67c

Browse files
committed
Stabilize std::io::ErrorKind::QuotaExceeded
Also drop "Filesystem" from its name
1 parent 8d6b88b commit 004b67c

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 king 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
@@ -446,7 +446,7 @@ impl ErrorKind {
446446
ExecutableFileBusy => "executable file busy",
447447
FileTooLarge => "file too large",
448448
FilesystemLoop => "filesystem loop or indirection limit (e.g. symlink loop)",
449-
FilesystemQuotaExceeded => "filesystem quota exceeded",
449+
QuotaExceeded => "quota exceeded",
450450
HostUnreachable => "host unreachable",
451451
Interrupted => "operation interrupted",
452452
InvalidData => "invalid data",

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

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

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

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

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

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

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ pub fn decode_error_kind(errno: i32) -> ErrorKind {
115115
c::ERROR_WRITE_PROTECT => return ReadOnlyFilesystem,
116116
c::ERROR_DISK_FULL | c::ERROR_HANDLE_DISK_FULL => return StorageFull,
117117
c::ERROR_SEEK_ON_DEVICE => return NotSeekable,
118-
c::ERROR_DISK_QUOTA_EXCEEDED => return FilesystemQuotaExceeded,
118+
c::ERROR_DISK_QUOTA_EXCEEDED => return QuotaExceeded,
119119
c::ERROR_FILE_TOO_LARGE => return FileTooLarge,
120120
c::ERROR_BUSY => return ResourceBusy,
121121
c::ERROR_POSSIBLE_DEADLOCK => return Deadlock,
@@ -140,7 +140,7 @@ pub fn decode_error_kind(errno: i32) -> ErrorKind {
140140
c::WSAEHOSTUNREACH => HostUnreachable,
141141
c::WSAENETDOWN => NetworkDown,
142142
c::WSAENETUNREACH => NetworkUnreachable,
143-
c::WSAEDQUOT => FilesystemQuotaExceeded,
143+
c::WSAEDQUOT => QuotaExceeded,
144144

145145
_ => Uncategorized,
146146
}

src/tools/miri/src/helpers.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ const UNIX_IO_ERROR_TABLE: &[(&str, std::io::ErrorKind)] = {
5252
("ECONNREFUSED", ConnectionRefused),
5353
("ECONNRESET", ConnectionReset),
5454
("EDEADLK", Deadlock),
55-
("EDQUOT", FilesystemQuotaExceeded),
55+
("EDQUOT", QuotaExceeded),
5656
("EEXIST", AlreadyExists),
5757
("EFBIG", FileTooLarge),
5858
("EHOSTUNREACH", HostUnreachable),

0 commit comments

Comments
 (0)