Skip to content

hermit/fs: Return unsupported() instead of from_raw_os_error(22) - #158247

Merged
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
hermit-os:hermit-fs-unsupported
Jul 30, 2026
Merged

hermit/fs: Return unsupported() instead of from_raw_os_error(22)#158247
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
hermit-os:hermit-fs-unsupported

Conversation

@mkroening

Copy link
Copy Markdown
Contributor

Currently, Hermit uses a mix of Err(Error::from_raw_os_error(22)) (EINVAL) and unsupported() for unsupported operations.

This PR makes Hermit consistently use unsupported() everywhere. This should address #158168 (comment) and #158168 (comment).

r? clarfonthey

CC: @stlankes

@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 Jun 22, 2026
@rust-log-analyzer

This comment has been minimized.

@mkroening

mkroening commented Jun 22, 2026

Copy link
Copy Markdown
Contributor Author

The CI failure is spurious and caused by GitHub. I will force-push to rerun CI.

@mkroening
mkroening force-pushed the hermit-fs-unsupported branch from 5177331 to d54558f Compare June 22, 2026 13:04
@clarfonthey

Copy link
Copy Markdown
Contributor

@rustbot blocked

Would prefer to merge #158168 first; wouldn't mind you rebasing on that PR ahead of time.

@rustbot rustbot added S-blocked Status: Blocked on something else such as an RFC or other implementation work. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jun 22, 2026
@mkroening
mkroening force-pushed the hermit-fs-unsupported branch from d54558f to 3d0b63d Compare July 29, 2026 13:40
@rustbot

rustbot commented Jul 29, 2026

Copy link
Copy Markdown
Collaborator

This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

@mkroening

Copy link
Copy Markdown
Contributor Author

Since #158168 is merged, I rebased on main.

@rustbot ready

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-blocked Status: Blocked on something else such as an RFC or other implementation work. labels Jul 29, 2026
@clarfonthey

Copy link
Copy Markdown
Contributor

@bors r+ rollup

Thank you!

@rust-bors

rust-bors Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 3d0b63d has been approved by clarfonthey

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 29, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Jul 29, 2026
…=clarfonthey

hermit/fs: Return `unsupported()` instead of `from_raw_os_error(22)`

Currently, Hermit uses a mix of `Err(Error::from_raw_os_error(22))` (`EINVAL`) and `unsupported()` for unsupported operations.

This PR makes Hermit consistently use `unsupported()` everywhere. This should address rust-lang#158168 (comment) and rust-lang#158168 (comment).

r? clarfonthey

CC: @stlankes
jhpratt added a commit to jhpratt/rust that referenced this pull request Jul 29, 2026
…=clarfonthey

hermit/fs: Return `unsupported()` instead of `from_raw_os_error(22)`

Currently, Hermit uses a mix of `Err(Error::from_raw_os_error(22))` (`EINVAL`) and `unsupported()` for unsupported operations.

This PR makes Hermit consistently use `unsupported()` everywhere. This should address rust-lang#158168 (comment) and rust-lang#158168 (comment).

r? clarfonthey

CC: @stlankes
rust-bors Bot pushed a commit that referenced this pull request Jul 29, 2026
Rollup of 17 pull requests

Successful merges:

 - #159014 ([rustdoc] Do not take `doc(cfg())` into account when filtering doctests)
 - #159130 (a bit optimize four-digit chunks in integer formatting)
 - #159592 (core: implement bounded random sampling)
 - #159898 (Add intrinsic-test alias and set  sample rate)
 - #158247 (hermit/fs: Return `unsupported()` instead of `from_raw_os_error(22)`)
 - #158649 (Hermit: fix `readdir()` )
 - #159049 (Avoid ICE in From/TryFrom cast suggestion when encountering HRTBs)
 - #160053 (test: add test suite for the 85681 issue)
 - #160087 (Add regression test for nested associated-type projection ICE)
 - #160090 (rustc_resolve: Further reduce mutability in resolver)
 - #160099 (Resolver: split module resolutions into local and external resolutions)
 - #160106 (Add suggestions for `must_implement_one_of`)
 - #160117 (Remove unnecessary format usage)
 - #160134 (Work around Wine bug 60084 by calling WSAStartup at most once)
 - #160142 (bootstrap: remove use-lld config alias)
 - #160148 (Rename `errors.rs` file to `diagnostics.rs` (15/N))
 - #160151 (Mark a doctest as requiring unwinding)
jhpratt added a commit to jhpratt/rust that referenced this pull request Jul 29, 2026
…=clarfonthey

hermit/fs: Return `unsupported()` instead of `from_raw_os_error(22)`

Currently, Hermit uses a mix of `Err(Error::from_raw_os_error(22))` (`EINVAL`) and `unsupported()` for unsupported operations.

This PR makes Hermit consistently use `unsupported()` everywhere. This should address rust-lang#158168 (comment) and rust-lang#158168 (comment).

r? clarfonthey

CC: @stlankes
rust-bors Bot pushed a commit that referenced this pull request Jul 29, 2026
Rollup of 18 pull requests

Successful merges:

 - #159130 (a bit optimize four-digit chunks in integer formatting)
 - #159592 (core: implement bounded random sampling)
 - #159898 (Add intrinsic-test alias and set  sample rate)
 - #158247 (hermit/fs: Return `unsupported()` instead of `from_raw_os_error(22)`)
 - #158649 (Hermit: fix `readdir()` )
 - #159049 (Avoid ICE in From/TryFrom cast suggestion when encountering HRTBs)
 - #160053 (test: add test suite for the 85681 issue)
 - #160087 (Add regression test for nested associated-type projection ICE)
 - #160090 (rustc_resolve: Further reduce mutability in resolver)
 - #160099 (Resolver: split module resolutions into local and external resolutions)
 - #160106 (Add suggestions for `must_implement_one_of`)
 - #160117 (Remove unnecessary format usage)
 - #160134 (Work around Wine bug 60084 by calling WSAStartup at most once)
 - #160139 (iter: specialize Take::count using advance_by)
 - #160142 (bootstrap: remove use-lld config alias)
 - #160148 (Rename `errors.rs` file to `diagnostics.rs` (15/N))
 - #160151 (Mark a doctest as requiring unwinding)
 - #160166 (Use correct feature gates for `f16`/`f128` `From` impls)
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Jul 29, 2026
…=clarfonthey

hermit/fs: Return `unsupported()` instead of `from_raw_os_error(22)`

Currently, Hermit uses a mix of `Err(Error::from_raw_os_error(22))` (`EINVAL`) and `unsupported()` for unsupported operations.

This PR makes Hermit consistently use `unsupported()` everywhere. This should address rust-lang#158168 (comment) and rust-lang#158168 (comment).

r? clarfonthey

CC: @stlankes
rust-bors Bot pushed a commit that referenced this pull request Jul 29, 2026
…uwer

Rollup of 18 pull requests

Successful merges:

 - #159898 (Add intrinsic-test alias and set  sample rate)
 - #158247 (hermit/fs: Return `unsupported()` instead of `from_raw_os_error(22)`)
 - #158649 (Hermit: fix `readdir()` )
 - #158693 (Add type-check to offload intrinisc calls)
 - #159049 (Avoid ICE in From/TryFrom cast suggestion when encountering HRTBs)
 - #159411 ([rustdoc] Correctly handle output options with --show-coverage)
 - #160053 (test: add test suite for the 85681 issue)
 - #160087 (Add regression test for nested associated-type projection ICE)
 - #160090 (rustc_resolve: Further reduce mutability in resolver)
 - #160099 (Resolver: split module resolutions into local and external resolutions)
 - #160106 (Add suggestions for `must_implement_one_of`)
 - #160117 (Remove unnecessary format usage)
 - #160134 (Work around Wine bug 60084 by calling WSAStartup at most once)
 - #160139 (iter: specialize Take::count using advance_by)
 - #160142 (bootstrap: remove use-lld config alias)
 - #160148 (Rename `errors.rs` file to `diagnostics.rs` (15/N))
 - #160151 (Mark a doctest as requiring unwinding)
 - #160166 (Use correct feature gates for `f16`/`f128` `From` impls)
rust-bors Bot pushed a commit that referenced this pull request Jul 30, 2026
Rollup of 20 pull requests

Successful merges:

 - #157669 (cfi: add diag mode support)
 - #158247 (hermit/fs: Return `unsupported()` instead of `from_raw_os_error(22)`)
 - #158649 (Hermit: fix `readdir()` )
 - #158693 (Add type-check to offload intrinisc calls)
 - #159049 (Avoid ICE in From/TryFrom cast suggestion when encountering HRTBs)
 - #159411 ([rustdoc] Correctly handle output options with --show-coverage)
 - #160053 (test: add test suite for the 85681 issue)
 - #160087 (Add regression test for nested associated-type projection ICE)
 - #160090 (rustc_resolve: Further reduce mutability in resolver)
 - #160099 (Resolver: split module resolutions into local and external resolutions)
 - #160101 (Add missing `needs-unwind` annotation to `add-spawn-hook-reentrancy-159923` test)
 - #160106 (Add suggestions for `must_implement_one_of`)
 - #160117 (Remove unnecessary format usage)
 - #160134 (Work around Wine bug 60084 by calling WSAStartup at most once)
 - #160139 (iter: specialize Take::count using advance_by)
 - #160142 (bootstrap: remove use-lld config alias)
 - #160148 (Rename `errors.rs` file to `diagnostics.rs` (15/N))
 - #160151 (Mark a doctest as requiring unwinding)
 - #160166 (Use correct feature gates for `f16`/`f128` `From` impls)
 - #160178 (Remove unused `va_start` intrinsic)
rust-bors Bot pushed a commit that referenced this pull request Jul 30, 2026
Rollup of 20 pull requests

Successful merges:

 - #157669 (cfi: add diag mode support)
 - #158247 (hermit/fs: Return `unsupported()` instead of `from_raw_os_error(22)`)
 - #158649 (Hermit: fix `readdir()` )
 - #158693 (Add type-check to offload intrinisc calls)
 - #159049 (Avoid ICE in From/TryFrom cast suggestion when encountering HRTBs)
 - #159411 ([rustdoc] Correctly handle output options with --show-coverage)
 - #160053 (test: add test suite for the 85681 issue)
 - #160087 (Add regression test for nested associated-type projection ICE)
 - #160090 (rustc_resolve: Further reduce mutability in resolver)
 - #160099 (Resolver: split module resolutions into local and external resolutions)
 - #160101 (Add missing `needs-unwind` annotation to `add-spawn-hook-reentrancy-159923` test)
 - #160106 (Add suggestions for `must_implement_one_of`)
 - #160117 (Remove unnecessary format usage)
 - #160134 (Work around Wine bug 60084 by calling WSAStartup at most once)
 - #160139 (iter: specialize Take::count using advance_by)
 - #160142 (bootstrap: remove use-lld config alias)
 - #160148 (Rename `errors.rs` file to `diagnostics.rs` (15/N))
 - #160151 (Mark a doctest as requiring unwinding)
 - #160166 (Use correct feature gates for `f16`/`f128` `From` impls)
 - #160178 (Remove unused `va_start` intrinsic)
@rust-bors
rust-bors Bot merged commit 34eff12 into rust-lang:main Jul 30, 2026
13 checks passed
@rustbot rustbot added this to the 1.99.0 milestone Jul 30, 2026
rust-timer added a commit that referenced this pull request Jul 30, 2026
Rollup merge of #158247 - hermit-os:hermit-fs-unsupported, r=clarfonthey

hermit/fs: Return `unsupported()` instead of `from_raw_os_error(22)`

Currently, Hermit uses a mix of `Err(Error::from_raw_os_error(22))` (`EINVAL`) and `unsupported()` for unsupported operations.

This PR makes Hermit consistently use `unsupported()` everywhere. This should address #158168 (comment) and #158168 (comment).

r? clarfonthey

CC: @stlankes
@mkroening
mkroening deleted the hermit-fs-unsupported branch July 30, 2026 11:55
@lcnr lcnr added the relnotes Marks issues that should be documented in the release notes of the next release. label Jul 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

relnotes Marks issues that should be documented in the release notes of the next release. 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