Skip to content

Add io::ErrorKind::InputOutputError#159070

Merged
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
valentynkit:io-error-input-output-error
Jul 11, 2026
Merged

Add io::ErrorKind::InputOutputError#159070
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
valentynkit:io-error-input-output-error

Conversation

@valentynkit

@valentynkit valentynkit commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Adds an unstable io::ErrorKind::InputOutputError for low-level I/O failures.

EIO currently decodes to ErrorKind::Uncategorized, so stable code cannot tell that an operation failed at the low-level I/O layer without inspecting raw_os_error() and a platform-specific libc/windows-sys constant.

Implements the accepted ACP rust-lang/libs-team#824. The variant name is still open for bikeshedding before stabilization (see the ACP); this uses InputOutputError as accepted for now.

The variant maps:

  • EIO on Unix, WASI, and teeos
  • ERROR_IO_DEVICE on Windows
  • FR_DISK_ERR on VEXos

I didn't add a test, since the decode tables don't have one today (same as #158326).

Tracking issue: #159066

r? libs

`EIO` decoded to `ErrorKind::Uncategorized`, so a low-level I/O
failure could only be detected through `raw_os_error()`. Map it, and
the equivalent codes on Windows (`ERROR_IO_DEVICE`) and VEXos
(`FR_DISK_ERR`), to a new unstable `InputOutputError` variant.
@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Jul 10, 2026

@JohnTitor JohnTitor left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rust-bors

rust-bors Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

📌 Commit acddbfd has been approved by JohnTitor

It is now in the queue for this repository.

@rust-bors rust-bors Bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 10, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Jul 10, 2026
…error, r=JohnTitor

Add `io::ErrorKind::InputOutputError`

Adds an unstable `io::ErrorKind::InputOutputError` for low-level I/O failures.

`EIO` currently decodes to `ErrorKind::Uncategorized`, so stable code cannot tell that an operation failed at the low-level I/O layer without inspecting `raw_os_error()` and a platform-specific `libc`/`windows-sys` constant.

Implements the accepted ACP rust-lang/libs-team#824. The variant name is still open for bikeshedding before stabilization (see the ACP); this uses `InputOutputError` as accepted for now.

The variant maps:
- `EIO` on Unix, WASI, and teeos
- `ERROR_IO_DEVICE` on Windows
- `FR_DISK_ERR` on VEXos

I didn't add a test, since the decode tables don't have one today (same as rust-lang#158326).

Tracking issue: rust-lang#159066

r? libs
rust-bors Bot pushed a commit that referenced this pull request Jul 11, 2026
Rollup of 15 pull requests

Successful merges:

 - #159106 (Update LLVM)
 - #157690 (codegen_ssa: pack small const aggregates into immediate stores)
 - #159005 (Use `as_lang_item` instead of repeatedly matching)
 - #156735 (Move NativeLib::filename to the rmeta-link archive member)
 - #157153 (allow `Allocator`s to be used as `#[global_allocator]`s)
 - #158269 (jq directives for jsondocck)
 - #158767 (merge DefKind::InlineConst into AnonConst)
 - #159099 (Stabilize String::from_utf8_lossy_owned)
 - #158930 (Reorganize `tests/ui/issues` [20/N])
 - #158965 (Add codegen test for Result is_ok unwrap)
 - #158979 (Reorganize `tests/ui/issues` [21/N])
 - #159050 (assert only opaques with sub unified hidden infer are non-rigid)
 - #159062 (Remove unused WEAK_ONLY_LANG_ITEMS static)
 - #159070 (Add `io::ErrorKind::InputOutputError`)
 - #159092 (make volatile operations const)
rust-bors Bot pushed a commit that referenced this pull request Jul 11, 2026
Rollup of 15 pull requests

Successful merges:

 - #159106 (Update LLVM)
 - #157690 (codegen_ssa: pack small const aggregates into immediate stores)
 - #159005 (Use `as_lang_item` instead of repeatedly matching)
 - #156735 (Move NativeLib::filename to the rmeta-link archive member)
 - #157153 (allow `Allocator`s to be used as `#[global_allocator]`s)
 - #158269 (jq directives for jsondocck)
 - #158767 (merge DefKind::InlineConst into AnonConst)
 - #159099 (Stabilize String::from_utf8_lossy_owned)
 - #158930 (Reorganize `tests/ui/issues` [20/N])
 - #158965 (Add codegen test for Result is_ok unwrap)
 - #158979 (Reorganize `tests/ui/issues` [21/N])
 - #159050 (assert only opaques with sub unified hidden infer are non-rigid)
 - #159062 (Remove unused WEAK_ONLY_LANG_ITEMS static)
 - #159070 (Add `io::ErrorKind::InputOutputError`)
 - #159092 (make volatile operations const)
@rust-bors rust-bors Bot merged commit a7d37d7 into rust-lang:main Jul 11, 2026
13 checks passed
@rustbot rustbot added this to the 1.99.0 milestone Jul 11, 2026
rust-timer added a commit that referenced this pull request Jul 11, 2026
Rollup merge of #159070 - valentynkit:io-error-input-output-error, r=JohnTitor

Add `io::ErrorKind::InputOutputError`

Adds an unstable `io::ErrorKind::InputOutputError` for low-level I/O failures.

`EIO` currently decodes to `ErrorKind::Uncategorized`, so stable code cannot tell that an operation failed at the low-level I/O layer without inspecting `raw_os_error()` and a platform-specific `libc`/`windows-sys` constant.

Implements the accepted ACP rust-lang/libs-team#824. The variant name is still open for bikeshedding before stabilization (see the ACP); this uses `InputOutputError` as accepted for now.

The variant maps:
- `EIO` on Unix, WASI, and teeos
- `ERROR_IO_DEVICE` on Windows
- `FR_DISK_ERR` on VEXos

I didn't add a test, since the decode tables don't have one today (same as #158326).

Tracking issue: #159066

r? libs
@JonathanBrouwer

Copy link
Copy Markdown
Contributor

@rust-timer build 881fc98

@rust-timer

Copy link
Copy Markdown
Collaborator

Queued 881fc98 with parent 48e8ec6, future comparison URL.
There is currently 1 preceding artifact in the queue.
It will probably take at least ~2.0 hours until the benchmark run finishes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-libs Relevant to the library team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants