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

This comment has been minimized.

pull Bot pushed a commit to xtqqczze/rust-lang-miri that referenced this pull request Jul 12, 2026
Rollup of 15 pull requests

Successful merges:

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

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (881fc98): comparison URL.

Overall result: ❌✅ regressions and improvements - please read:

Benchmarking means the PR may be perf-sensitive. It's automatically marked not fit for rolling up. Overriding is possible but disadvised: it risks changing compiler perf.

Next, please: If you can, justify the regressions found in this try perf run in writing along with @rustbot label: +perf-regression-triaged. If not, fix the regressions and do another perf run. Neutral or positive results will clear the label automatically.

@bors rollup=never
@rustbot label: -S-waiting-on-perf +perf-regression

Instruction count

Our most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
0.0% [0.0%, 0.1%] 3
Improvements ✅
(primary)
-0.6% [-0.6%, -0.6%] 1
Improvements ✅
(secondary)
-0.1% [-0.2%, -0.0%] 7
All ❌✅ (primary) -0.6% [-0.6%, -0.6%] 1

Max RSS (memory usage)

Results (secondary 2.6%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
2.6% [2.6%, 2.6%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Cycles

Results (secondary 1.9%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
5.0% [1.7%, 9.8%] 5
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-3.2% [-4.2%, -2.4%] 3
All ❌✅ (primary) - - 0

Binary size

This perf run didn't have relevant results for this metric.

Bootstrap: 490.729s -> 490.282s (-0.09%)
Artifact size: 389.29 MiB -> 391.18 MiB (0.49%)

@rustbot rustbot added the perf-regression Performance regression. label Jul 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

perf-regression Performance regression. 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