Add io::ErrorKind::InputOutputError#159070
Conversation
`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.
…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
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)
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)
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
|
@rust-timer build 881fc98 |
This comment has been minimized.
This comment has been minimized.
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)
|
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 @bors rollup=never Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
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.
CyclesResults (secondary 1.9%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeThis perf run didn't have relevant results for this metric. Bootstrap: 490.729s -> 490.282s (-0.09%) |
Adds an unstable
io::ErrorKind::InputOutputErrorfor low-level I/O failures.EIOcurrently decodes toErrorKind::Uncategorized, so stable code cannot tell that an operation failed at the low-level I/O layer without inspectingraw_os_error()and a platform-specificlibc/windows-sysconstant.Implements the accepted ACP rust-lang/libs-team#824. The variant name is still open for bikeshedding before stabilization (see the ACP); this uses
InputOutputErroras accepted for now.The variant maps:
EIOon Unix, WASI, and teeosERROR_IO_DEVICEon WindowsFR_DISK_ERRon VEXosI didn't add a test, since the decode tables don't have one today (same as #158326).
Tracking issue: #159066
r? libs