Skip to content

Commit df91b98

Browse files
GrigorenkoPVgitbot
authored and
gitbot
committed
Stabilize std::io::ErrorKind::QuotaExceeded
Also drop "Filesystem" from its name
1 parent 5f5925e commit df91b98

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

std/src/io/error.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -338,9 +338,9 @@ pub enum ErrorKind {
338338
/// example, on Unix, a named pipe opened with `File::open`.
339339
#[stable(feature = "io_error_a_bit_more", since = "1.83.0")]
340340
NotSeekable,
341-
/// Filesystem quota was exceeded.
342-
#[unstable(feature = "io_error_more", issue = "86442")]
343-
FilesystemQuotaExceeded,
341+
/// Filesystem quota or some other kind of quota was exceeded.
342+
#[stable(feature = "io_error_quota_exceeded", since = "CURRENT_RUSTC_VERSION")]
343+
QuotaExceeded,
344344
/// File larger than allowed or supported.
345345
///
346346
/// This might arise from a hard limit of the underlying filesystem or file access API, or from
@@ -462,7 +462,7 @@ impl ErrorKind {
462462
ExecutableFileBusy => "executable file busy",
463463
FileTooLarge => "file too large",
464464
FilesystemLoop => "filesystem loop or indirection limit (e.g. symlink loop)",
465-
FilesystemQuotaExceeded => "filesystem quota exceeded",
465+
QuotaExceeded => "quota exceeded",
466466
HostUnreachable => "host unreachable",
467467
Interrupted => "operation interrupted",
468468
InProgress => "in progress",

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,

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ pub fn decode_error_kind(errno: i32) -> ErrorKind {
7171
libc::ECONNREFUSED => ConnectionRefused,
7272
libc::ECONNRESET => ConnectionReset,
7373
libc::EDEADLK => Deadlock,
74-
libc::EDQUOT => FilesystemQuotaExceeded,
74+
libc::EDQUOT => QuotaExceeded,
7575
libc::EEXIST => AlreadyExists,
7676
libc::EFBIG => FileTooLarge,
7777
libc::EHOSTUNREACH => HostUnreachable,

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,

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
}

0 commit comments

Comments
 (0)