Skip to content

std: map ENOTSUP to ErrorKind::Unsupported - #158580

Merged
rust-bors[bot] merged 2 commits into
rust-lang:mainfrom
valentynkit:enotsup-unsupported
Aug 18, 2026
Merged

rust-bors[bot] merged 2 commits into
rust-lang:mainfrom
valentynkit:enotsup-unsupported

Conversation

@valentynkit

@valentynkit valentynkit commented Jun 29, 2026 •

Copy link
Copy Markdown
Contributor

View all comments

ENOTSUP and EOPNOTSUPP both mean the operation isn't supported. They're the same value on some targets (Linux, FreeBSD), where the existing EOPNOTSUPP => Unsupported arm (#139822) already covers both, and different on others (Apple, OpenBSD), where ENOTSUP decodes to Uncategorized instead. I don't see a reason to treat it differently, so this maps ENOTSUP to Unsupported as well.

It uses a match guard rather than an or-pattern, since the two are equal on the targets where they alias and an or-pattern would be unreachable there. Same shape as the EAGAIN/EWOULDBLOCK arm just below:

x if x == libc::EOPNOTSUPP || x == libc::ENOTSUP => Unsupported,

This was raised once before (#125228) and closed, since both errnos were left out of the original Unsupported PR (#78880). #139822 has since added EOPNOTSUPP, so the same reasoning now covers ENOTSUP.

I didn't add a test, since the decode arms aren't tested today.

r? libs

@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 29, 2026
@workingjubilee

workingjubilee commented Jun 29, 2026 •

Copy link
Copy Markdown
Member

No reasoning was given in the PR where the behavior was changed. It was simply claimed to be incorrect.

@workingjubilee

workingjubilee commented Jun 29, 2026 •

Copy link
Copy Markdown
Member

As far as I understand it, ErrorKind::Unsupported is intended to map to "never succeeds", which is not what this error code indicates. Making the behavior more incorrect because a previous PR made it incorrect, by itself simply claiming it was incorrect, does not seem desirable to me. I'm not sure what else we should be doing though.

@ds84182

ds84182 commented Jun 30, 2026

Copy link
Copy Markdown

https://lists.gnu.org/archive/html/bug-glibc/2002-08/msg00017.html

POSIX 1003.1-200 defines the errors EOPNOTSUPP and ENOTSUP as follows:

[ENOTSUP] Not supported. The implementation does not support this feature of the Realtime Option Group.

[EOPNOTSUPP] Operation not supported on socket. The type of socket (address family or protocol) does not support the requested operation.

So EOPNOTSUPP is specifically for sockets and ENOTSUP is for everything else. The generally accepted error message seems to be "Operation is not supported on transport endpoint" for EOPNOTSUPP.

@valentynkit

Copy link
Copy Markdown
Contributor Author

No reasoning was given in the PR where the behavior was changed. It was simply claimed to be incorrect.

You're right that I didn't justify in PR the mapping beyond calling the old one incorrect, so I won't lean on it as precedent.

[ENOTSUP]
Not supported (may be the same value as [EOPNOTSUPP]).
The split only shows up on Apple and the BSDs, and only because ENOTSUP got left out. So this isn't adding a new behavior, it's making one errno categorize the same way across targets instead of dropping to Uncategorized on Apple alone.

The reason I'd keep the two together is simpler: ENOTSUP and EOPNOTSUPP are the same integer on Linux, Android and FreeBSD, so an ENOTSUP error already decodes to Unsupported there through the existing arm.

So EOPNOTSUPP is specifically for sockets and ENOTSUP is for everything else. The generally accepted error message seems to be "Operation is not supported on transport endpoint" for EOPNOTSUPP.

You're right that neither strictly means "never succeeds on this platform" (both can be per-socket or per-fs), so I'm happy to take the broader question to a separate issue if you'd rather reconsider Unsupported for both, reverting #139822 included.

The goal is portability: an ENOTSUP fallback that matches ErrorKind::Unsupported shouldn't work on Linux but silently miss on macOS. Left as-is, ENOTSUP just stays inconsistent with EOPNOTSUPP on the targets where they differ.

@workingjubilee

Copy link
Copy Markdown
Member

You're right that I didn't justify in PR the mapping beyond calling the old one incorrect, so I won't lean on it as precedent.

...Typo? That was by @ozgureyilmaz, so surely it was not your responsibility to justify the PR that you did not author.

But yes, I think we can agree that whatever is decided, the reasoning should be able to stand on its own. And I can see the argument for making the change. At the very least, surely we should be offering something better than just "Uncategorized".

@jhpratt

jhpratt commented Jul 1, 2026

Copy link
Copy Markdown
Member

I don't particularly understand the implications of this change.

r? @workingjubilee; feel free to reassign if wanted

@rustbot rustbot assigned workingjubilee and unassigned jhpratt Jul 1, 2026
@rustbot

rustbot commented Jul 1, 2026

Copy link
Copy Markdown
Collaborator

workingjubilee is currently at their maximum review capacity.
They may take a while to respond.

@workingjubilee

Copy link
Copy Markdown
Member

honestly I'm not sure if anyone does :ferris_clueless:

@valentynkit

Copy link
Copy Markdown
Contributor Author

Okay, so currently Unsupported doc itself says "the operation can never succeed", but that already isn't true for what maps there.

/// This operation is unsupported on this platform.
///
/// This means that the operation can never succeed.

EOPNOTSUPP already in Unsupported is per socket and ENOTSUP is per-fd/fs, both can suceed on a different object.
Only ENOSYS really means "never".

Not pushing any of these, just mapping what I see:

  1. Map ENOTSUP like EOPNOTSUPP (this PR) so one errno stops decoding to two kinds across targets, they're already the same integer on Linux.
  2. Reverting Fix: Map EOPNOTSUPP to ErrorKind::Unsupported on UnixΒ #139822 and move EOPNOTSUPP back to Uncategorized so both of them will be in Uncategorized.
    And Unsupported kind will be for truly "never" codes like ENOSYS.
    Does moving it back count as a contract break? Based on docs errno -> kind isn't a stability guarantee.
  3. Give the conditional "not supported on this object" codes their own kind, so both EOPNOTSUPP and ENOTSUP will be on new seperate category something like OperationsNotSupported (just a placeholder, a clearer one could be picked), starting ACP for this etc...
  4. Or leave it as-is and close this out. If the inconsistency isn't worth the churn, that's a fine answer too and I'm happy to close.

I feel like option 1, is a minimal change that fixes the inconsistency, and avoid potential confusion.

@rust-bors

This comment has been minimized.

decode_error_kind maps EOPNOTSUPP to Unsupported but not ENOTSUP. The
two are the same value on some targets (Linux, FreeBSD), where that arm
already covers both, and different on others (Apple, OpenBSD), where
ENOTSUP fell through to Uncategorized.

Since they alias on some targets, an or-pattern would be an unreachable
arm there; use a match guard, like the existing EAGAIN/EWOULDBLOCK arm.
@valentynkit
valentynkit force-pushed the enotsup-unsupported branch from 9a9e690 to bc4ab23 Compare July 29, 2026 07:54
@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.

@valentynkit

Copy link
Copy Markdown
Contributor Author

Rebased onto master.
It's been open a while, so: worth proceeding, or should I close it?

@joshtriplett joshtriplett added I-libs-api-nominated [DEPRECATED; DO NOT USE] T-libs-api [DEPRECATED; DO NOT USE] and removed T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Aug 4, 2026
@joshtriplett

Copy link
Copy Markdown
Member

@rfcbot merge libs-api

@rust-rfcbot

rust-rfcbot commented Aug 4, 2026 •

Copy link
Copy Markdown
Collaborator

@joshtriplett has proposed to merge this. The next step is review by the rest of the tagged team members:

No concerns currently listed.

Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up!

See this document for info about what commands tagged team members can give me.

@nia-e

nia-e commented Aug 4, 2026

Copy link
Copy Markdown
Member

Per today's libs-api meeting, we're happy with this; since it's a commitment to use that error kind, this will need FCP though.

@rust-rfcbot rust-rfcbot added proposed-final-comment-period Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off. disposition-merge This issue / PR is in PFCP or FCP with a disposition to merge it. final-comment-period In the final comment period and will be merged soon unless new substantive objections are raised. labels Aug 4, 2026
@rust-rfcbot

Copy link
Copy Markdown
Collaborator

πŸ”” This is now entering its final comment period, as per the review above. πŸ””

@rust-rfcbot rust-rfcbot removed the proposed-final-comment-period Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off. label Aug 4, 2026
@dtolnay dtolnay removed the I-libs-api-nominated [DEPRECATED; DO NOT USE] label Aug 11, 2026
@clarfonthey clarfonthey added T-libs Relevant to the library team, which will review and decide on the PR/issue. and removed T-libs-api [DEPRECATED; DO NOT USE] labels Aug 12, 2026
@rust-rfcbot rust-rfcbot added finished-final-comment-period The final comment period is finished for this PR / Issue. and removed final-comment-period In the final comment period and will be merged soon unless new substantive objections are raised. labels Aug 14, 2026
@rust-rfcbot

Copy link
Copy Markdown
Collaborator

The final comment period, with a disposition to merge, as per the review above, is now complete.

As the automated representative of the governance process, I would like to thank the author for their work and everyone else who contributed.

// EOPNOTSUPP and ENOTSUP can have the same value on some systems,
// but different values on others (e.g. Apple), so we can't use a
// match clause
x if x == libc::EOPNOTSUPP || x == libc::ENOTSUP => Unsupported,

@RalfJung RalfJung Aug 15, 2026 •

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.

Note that there is also ENOSYS mapping to the same thing. Seems better to group all 3 together.

View changes since the review

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thanks for highlighting this, you are right ENOSYS maps to Unsupported as well.

Currently the guard was added because Linux libc defines ENOTSUP as EOPNOTSUPP (same value), so an or-pattern would be unreachable and dead code on Linux (95 | 95 => ...).
ENOSYS have distinct value, so it doesn't need a guard, and keeping it as pattern has some benefits (compiler could catch if it will collide with another arm).

I could add it, if you prefer to have 3 of them grouped together anyway, if not, i could just move ENOSYS arm right above this guard, so Unsupported case will be near each other.

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.

IMO it'd be best to have them all next to each other -- whether as one arm or as two (one using the if ... || ...) doesn't matter much IMO.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yeah agree, moved ENOSYS to have Unsupported cases next to each other.

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.

Hm. Annoying feature of the pattern matching lint, that.

@workingjubilee

Copy link
Copy Markdown
Member

Apologies for not queueing it up myself. Yes, the thing that needed to happen was an FCP and that happened. This is fine, now.

@bors r+ rollup

@rust-bors

rust-bors Bot commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

πŸ“Œ Commit aa49d14 has been approved by workingjubilee

It is now in the queue for this repository.

🌲 The tree is currently closed for pull requests below priority 5. This pull request will be tested once the tree is reopened.

Reason for tree closure: github outage

@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 Aug 17, 2026
rust-bors Bot pushed a commit that referenced this pull request Aug 18, 2026
Rollup of 9 pull requests

Successful merges:

 - #161137 (Simplify Encodable derives)
 - #161193 (remove pointless span from partial-mitigations diagnostics)
 - #161249 (Add regression test for missing size bound suggestion for trait item)
 - #156591 (Improve diagnostics for ambiguous binops with as _)
 - #158580 (std: map ENOTSUP to ErrorKind::Unsupported)
 - #161076 (update bpf abi to match Clang 23)
 - #161240 (mailmap: Add Wilfred)
 - #161245 (document meaning of empty feature name in correct_fixed_length_vector_abi tables)
 - #161250 (core/num: Implement feature `float_nan_to`)
@rust-bors
rust-bors Bot merged commit cdde1d2 into rust-lang:main Aug 18, 2026
13 checks passed
@rustbot rustbot added this to the 1.100.0 milestone Aug 18, 2026
rust-bors Bot pushed a commit that referenced this pull request Aug 18, 2026
Rollup merge of #158580 - valentynkit:enotsup-unsupported, r=workingjubilee

std: map ENOTSUP to ErrorKind::Unsupported

`ENOTSUP` and `EOPNOTSUPP` both mean the operation isn't supported. They're the same value on some targets (Linux, FreeBSD), where the existing `EOPNOTSUPP => Unsupported` arm (#139822) already covers both, and different on others (Apple, OpenBSD), where `ENOTSUP` decodes to `Uncategorized` instead. I don't see a reason to treat it differently, so this maps `ENOTSUP` to `Unsupported` as well.

It uses a match guard rather than an or-pattern, since the two are equal on the targets where they alias and an or-pattern would be unreachable there. Same shape as the `EAGAIN`/`EWOULDBLOCK` arm just below:

```rust
x if x == libc::EOPNOTSUPP || x == libc::ENOTSUP => Unsupported,
```

This was raised once before (#125228) and closed, since both errnos were left out of the original `Unsupported` PR (#78880). #139822 has since added `EOPNOTSUPP`, so the same reasoning now covers `ENOTSUP`.

I didn't add a test, since the decode arms aren't tested today.

r? libs
tibordp added a commit to tibordp/newt that referenced this pull request Oct 22, 2026
…what's already gone

Copying out of an archive asked "Cannot preserve extended attributes"
and "… alternate streams" once each: the default `Vfs::read_attribute`,
which archives, disc images and SFTP inherit, answered not-supported for
every attribute kind. It now answers that there is nothing to carry, as
S3 and a local Windows source already did.

A destination answering not-supported no longer prompts either β€” xattrs
or resource forks over SFTP or onto Windows. The skip is decided by the
filesystem's answer to each call, not by its type, since one protocol can
front filesystems that differ (SFTP to a Mac can't take xattrs; a remote
session's agent on the same Mac can). That reverses bc4abd4's "a copy to
Windows still prompts, since the loss is real": the prompt came on nearly
every copy (every macOS file carries com.apple.provenance) and only Skip
could ever answer it. Creation-time options (sparse, S3 headers) retry
without the option silently for the same reason. Every other failure
still prompts.

The io::Error conversion maps ENOTSUP to NotSupported: stable std maps
only EOPNOTSUPP, a different number on macOS, where xattr calls answer
ENOTSUP (rust-lang/rust#158580 fixes std).

Delete counts an entry that is already gone by its turn as deleted: on
macOS, deleting a file on exFAT or FAT also removes its `._` AppleDouble
companion, which the walk had listed separately, and the delete then
stopped on "No such file or directory".
wip-sync pushed a commit to NetBSD/pkgsrc-wip that referenced this pull request Nov 13, 2026
Pkgsrc changes:
 * Version & checksum changes.
 * Adapt patches to match.

Upstream changes:

Version 1.100.0 (2026-11-12)
==========================

Language
--------
- [Stabilize never type]
  (rust-lang/rust#155499)
- [Lint against repeated `#[repr(..)]` attributes]
  (rust-lang/rust#157036)
- [Stabilize `extern "custom"`]
  (rust-lang/rust#158504)
- [Extend `dropping_references`, `dropping_copy_types` and
  `undropped_manually_drops` lints to `drop_in_place`]
  (rust-lang/rust#160229)
- [`unfulfilled_lint_expectations` no longer fires on
  `#[expect(dead_code)]` inside code that is covered by a dead parent's
  diagnostic] (rust-lang/rust#161005)
- [Turn the error for `repr(align)` fields in a `repr(packed)` type
  into a deny-by-default lint `aligned_fields_in_packed`]
  (rust-lang/rust#162160)
- [volatile: allow accesses to non-AM memory to trap]
  (rust-lang/rust#160564)

Compiler
--------
- [Stabilize `-Cprofile-sample-use`]
  (rust-lang/rust#155942)
- [Enable next solver by default in orphanck]
  (rust-lang/rust#160668)

Platform Support
----------------
- [`i686-pc-windows-gnu` is now a tier 2 without host tools target]
  (rust-lang/rust#161681)
- [Promote `wasm32-wasip3` to Tier 2]
  (rust-lang/rust#161940)
- [Add new Tier 3 target `powerpc64-sony-ps3`]
  (rust-lang/rust#162072)

Refer to Rust's [platform support page][platform-support-doc]
for more information on Rust's tiered platform support.

[platform-support-doc]: https://doc.rust-lang.org/rustc/platform-support.html

Libraries
---------
- [Stabilize custom allocators]
  (rust-lang/rust#156882)
- [Map `ENOTSUP` to `ErrorKind::Unsupported`]
  (rust-lang/rust#158580)
- [Fix soundness issues in `std::sys::pal::sgx::waitqueue::unsafe_list`]
  (rust-lang/rust#161334)

Stabilized APIs
---------------

- [`impl PartialEq<Cow<'_, [U]>> for Vec<T, A>`]
  (https://doc.rust-lang.org/stable/std/vec/struct.Vec.html#impl-PartialEq%3CCow%3C'_,+%5BU%5D%3E%3E-for-Vec%3CT,+A%3E)
- [`impl PartialEq<Cow<'_, [U]>> for &[T]`]
  (https://doc.rust-lang.org/stable/std/primitive.slice.html#impl-PartialEq%3CCow%3C'_,+%5BU%5D%3E%3E-for-%26%5BT%5D)
- [`impl PartialEq<Cow<'_, [U]>> for &mut [T]`]
  (https://doc.rust-lang.org/stable/std/primitive.slice.html#impl-PartialEq%3CCow%3C'_,+%5BU%5D%3E%3E-for-%26mut+%5BT%5D)
- [`std::alloc::Allocator`]
  (https://doc.rust-lang.org/stable/std/alloc/trait.Allocator.html)
- [`std::alloc::Global`]
  (https://doc.rust-lang.org/stable/std/alloc/struct.Global.html)
- [`std::alloc::System`]
  (https://doc.rust-lang.org/stable/std/alloc/struct.System.html)
- [`impl Allocator for Global`]
  (https://doc.rust-lang.org/stable/std/alloc/trait.Allocator.html#impl-Allocator-for-Global)
- [`impl Allocator for System`]
  (https://doc.rust-lang.org/stable/std/alloc/trait.Allocator.html#impl-Allocator-for-System)
- [`impl<A: Allocator> Allocator for &A`]
  (https://doc.rust-lang.org/stable/std/alloc/trait.Allocator.html#impl-Allocator-for-%26A)
- [`impl<T: Allocator, A: Allocator> Allocator for Box<T, A>`]
  (https://doc.rust-lang.org/stable/std/alloc/trait.Allocator.html#impl-Allocator-for-Box%3CT,+A%3E)
- [`impl<A: Allocator> Allocator for &mut A`]
  (https://doc.rust-lang.org/stable/std/alloc/trait.Allocator.html#impl-Allocator-for-%26mut+A)
- [`impl<T: Allocator, A: Allocator> Allocator for Arc<T, A>`]
  (https://doc.rust-lang.org/stable/std/alloc/trait.Allocator.html#impl-Allocator-for-Arc%3CT,+A%3E)
- [`impl<T: Allocator, A: Allocator> Allocator for Rc<T, A>`]
  (https://doc.rust-lang.org/stable/std/alloc/trait.Allocator.html#impl-Allocator-for-Rc%3CT,+A%3E)
- [`Box::new_in`]
  (https://doc.rust-lang.org/stable/std/boxed/struct.Box.html#method.new_in)
- [`Box::from_raw_in`]
  (https://doc.rust-lang.org/stable/std/boxed/struct.Box.html#method.from_raw_in)
- [`Box::from_non_null_in`]
  (https://doc.rust-lang.org/stable/std/boxed/struct.Box.html#method.from_non_null_in)
- [`Box::into_raw_with_allocator`]
  (https://doc.rust-lang.org/std/std/boxed/struct.Box.html#method.into_raw_with_allocator)
- [`Box::into_non_null_with_allocator`]
  (https://doc.rust-lang.org/stable/std/boxed/struct.Box.html#method.into_non_null_with_allocator)
- [`Box::allocator`]
  (https://doc.rust-lang.org/stable/std/boxed/struct.Box.html#method.allocator)
- [`Vec::new_in`]
  (https://doc.rust-lang.org/stable/std/vec/struct.Vec.html#method.new_in)
- [`Vec::with_capacity_in`]
  (https://doc.rust-lang.org/stable/std/vec/struct.Vec.html#method.with_capacity_in)
- [`Vec::from_raw_parts_in`]
  (https://doc.rust-lang.org/stable/std/vec/struct.Vec.html#method.from_raw_parts_in)
- [`Vec::from_parts_in`]
  (https://doc.rust-lang.org/stable/stable/vec/struct.Vec.html#method.from_parts_in)
- [`Vec::into_raw_parts_with_allocator`]
  (https://doc.rust-lang.org/stable/std/vec/struct.Vec.html#method.into_raw_parts_with_allocator)
- [`Vec::into_parts_with_allocator`]
  (https://doc.rust-lang.org/stable/std/vec/struct.Vec.html#method.into_parts_with_allocator)
- [`Vec::allocator`]
  (https://doc.rust-lang.org/stable/std/vec/struct.Vec.html#method.allocator)
- [`Child::main_thread_handle`]
  (https://doc.rust-lang.org/stable/std/os/windows/process/trait.ChildExt.html#tymethod.main_thread_handle)
- [`impl Default for std::sync::Once`]
  (https://doc.rust-lang.org/stable/std/sync/struct.Once.html#impl-Default-for-Once)
- [`bool::toggle`]
  (https://doc.rust-lang.org/stable/std/primitive.bool.html#method.toggle)
- [`Box::take`]
  (https://doc.rust-lang.org/stable/std/boxed/struct.Box.html#method.take)
- [`Box::map`]
  (https://doc.rust-lang.org/stable/std/boxed/struct.Box.html#method.map)
- [`Rc::map`]
  (https://doc.rust-lang.org/stable/std/rc/struct.Rc.html#method.map)
- [`Arc::map`]
  (https://doc.rust-lang.org/stable/std/sync/struct.Arc.html#method.map)
- [`impl AsRef<T> for !`]
  (https://doc.rust-lang.org/stable/std/primitive.never.html#impl-AsRef<T>-for-!)
- [`impl AsMut<T> for !`]
  (https://doc.rust-lang.org/stable/std/primitive.never.html#impl-AsMut<T>-for-!)
- [`core::mem::DropGuard`]
  (https://doc.rust-lang.org/stable/core/mem/struct.DropGuard.html)
- [`core::mem::conjure_zst`]
  (https://doc.rust-lang.org/stable/core/mem/fn.conjure_zst.html)
- [`UnsafeCell::replace`]
  (https://doc.rust-lang.org/stable/std/cell/struct.UnsafeCell.html#method.replace)
- [`UnsafeCell::as_ref_unchecked`]
  (https://doc.rust-lang.org/stable/std/cell/struct.UnsafeCell.html#method.as_ref_unchecked)
- [`UnsafeCell::as_mut_unchecked`]
  (https://doc.rust-lang.org/stable/std/cell/struct.UnsafeCell.html#method.as_mut_unchecked)
- [`str::trim_prefix`]
  (https://doc.rust-lang.org/stable/std/primitive.str.html#method.trim_prefix)
- [`str::trim_suffix`]
  (https://doc.rust-lang.org/stable/std/primitive.str.html#method.trim_suffix)
- [`[T]::trim_prefix`]
  (https://doc.rust-lang.org/stable/std/primitive.slice.html#method.trim_prefix)
- [`[T]::trim_suffix`]
  (https://doc.rust-lang.org/stable/std/primitive.slice.html#method.trim_suffix)
- [`Path::trim_prefix`]
  (https://doc.rust-lang.org/stable/std/path/struct.Path.html#method.trim_prefix)
- [`Vec::from_fn`]
  (https://doc.rust-lang.org/stable/std/vec/struct.Vec.html#method.from_fn)
- [`os::windows::process::CommandExt::show_window`]
  (https://doc.rust-lang.org/stable/std/os/windows/process/trait.CommandExt.html#tymethod.show_window)

Cargo
-----
- Introduced Cargo's own linting system: some Cargo warnings are
  now emitted as lints that users can control in the `[lints.cargo]`
  table. This includes a new built-in unused dependency check via
  the `cargo::unused_dependencies` lint.
  [docs](https://doc.rust-lang.org/stable/cargo/reference/lints.html)
  [#17298](rust-lang/cargo#17298)
- Introduced minimum publish age configurations, also known as
  dependency cooldowns. When the relevant config is set, the resolver
  ignores versions published more recently than that, unless they
  are already in `Cargo.lock`. ([RFC 3923]
  (https://rust-lang.github.io/rfcs/3923-cargo-min-publish-age.html))
  [docs]
  (https://doc.rust-lang.org/stable/cargo/reference/resolver.html#publish-age)
  [#17335]
  (rust-lang/cargo#17335)
- cargo-install: now uses the existing lockfile in the `.crate`
  tarball by default. `--locked` in cargo install becomes a no-op.
  [#17388](rust-lang/cargo#17388)
- Cargo now uses a new directory layout for intermediate build
  artifacts. Tools that inspect the build directory may need to use
  [CargoΓ’s JSON messages]
  (https://doc.rust-lang.org/stable/cargo/reference/external-tools.html#json-messages)
  to locate build artifacts instead of relying on the build directory
  layout. The layout is not a stable interface and is subject to
  change. ([build cache doc]
  (https://doc.rust-lang.org/stable/cargo/reference/build-cache.html))
  [#17354](rust-lang/cargo#17354)

Rustdoc
-----
- [Add new `invalid_markdown_table` rustdoc lint]
  (rust-lang/rust#159583)

Compatibility Notes
-------------------
- [Closures now more precisely capture variables used in `if let`. This may cause new errors]
  (rust-lang/rust#154210)
- [Check dyn-compatibility of trait objects in more places]
  (rust-lang/rust#154992)
- [`Infallible` is now a type alias to `!`]
  (rust-lang/rust#155499)
- [The never type fallback was changed to `!` on all editions]
  (rust-lang/rust#155499)
- [`box` patterns are no longer syntactically allowed]
  (rust-lang/rust#156749)
- [Report Query Cycle errors in more cases when computing the layout of enums with explicit discriminants]
  (rust-lang/rust#157562)
- [Always escape grapheme extenders in `str::escape_debug`]
  (rust-lang/rust#158303)
- [Make let-else respect `macro_rules` `expr` metavariable grouping]
  (rust-lang/rust#158515)
- [`Iterator::{min,max}(_by_key)` changed which `Ord` methods they use.]
  (rust-lang/rust#160203) This cannot change
  behaviour (other than being potentially faster) for types correctly
  following the [`Ord` rules]
  (https://doc.rust-lang.org/std/cmp/trait.Ord.html), but may impact
  types with inconsistent trait implementations.
- [Emit an error when trying to enable SSE/AVX on an x86 (32bit or
  64bit) softfloat target]
  (rust-lang/rust#160302)
- [Require windowed (and exception) for Xtensa ABI]
  (rust-lang/rust#160643)
- [windows-gnullvm: always link libunwind statically]
  (rust-lang/rust#160712)
- [From version 1.94 up to 1.100 a number of ARMv7-A hardfloat
  targets required the `VFPv3-D32` FPU as a minimum, as they erroneously
  had the `d32` feature in their baseline list of features. Breakage
  introduced as a result of correcting this can be fixed by passing
  `-Ctarget-feature=+d32` to Rust.]
  (rust-lang/rust#160911)
- [Change "Rust" ABI on x86 to use SSE registers if they are
  always-available for the current target]
  (rust-lang/rust#161583)
- [Make the `ambiguous_glob_imported_traits` lint fire in slightly more cases]
  (rust-lang/rust#161805)
- [Make `+fix-cortex-a53-835769` a default feature for
`aarch64-unknown-fuchsia`]
  (rust-lang/rust#161886)
- [Some impls on `Box` have been generalised to arbitrary allocators,
  which may cause new type inference errors]
  (rust-lang/rust#161946)
- [The standard library now uses Unicode version 18.0.0]
  (https://doc.rust-lang.org/stable/std/primitive.char.html#associatedconstant.UNICODE_VERSION)
- [WASI SDK version was bumped from 33 to 34]
  (rust-lang/rust#163809)
- [On ARM targets, `-Ctarget-feature`/`-Ctarget-cpu` values that
  would alter the ABI are rejected as hard errors now.]
  (rust-lang/rust#161280)

Other
-----
- [Test harness now allows passing `--test-threads` and `--color`
  multiple times, with later arguments overriding earlier ones]
  (rust-lang/rust#161312)
tibbe-bot added a commit to tibbe/linewright that referenced this pull request Nov 16, 2026
The comment said std maps `ENOTSUP` to no `ErrorKind` on macOS, citing
rust-lang/rust#158580. That pull request shipped in Rust 1.100.0, which
now maps it to `Unsupported`, so the comment no longer holds. The match
on the errnos stays: the doc comment above names them, and they are what
`clonefile(2)` fails with.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
markharding pushed a commit to futo-org/Harbor that referenced this pull request Nov 17, 2026
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [rust](https://rust-lang.org/) ([source](https://github.com/rust-lang/rust), [changelog](https://github.com/rust-lang/rust/blob/main/RELEASES.md)) | tools | minor | `1.99.1` β†’ `1.100.0` |
| [rust](https://hub.docker.com/_/rust) ([source](https://github.com/rust-lang/docker-rust)) | stage | minor | `1.99-slim-trixie` β†’ `1.100-slim-trixie` |
| [rust](https://hub.docker.com/_/rust) ([source](https://github.com/rust-lang/docker-rust)) | final | minor | `1.99-slim-trixie` β†’ `1.100-slim-trixie` |

---

### Release Notes

<details>
<summary>rust-lang/rust (rust)</summary>

### [`v1.100.0`](https://github.com/rust-lang/rust/blob/HEAD/RELEASES.md#Version-11000-2026-11-12)

[Compare Source](rust-lang/rust@1.99.1...1.100.0)

\==========================

<a id="1.100.0-Language"></a>

## Language

- [Stabilize never type](rust-lang/rust#155499)
- [Lint against repeated `#[repr(..)]` attributes](rust-lang/rust#157036)
- [Stabilize `extern "custom"`](rust-lang/rust#158504)
- [Extend `dropping_references`, `dropping_copy_types` and `undropped_manually_drops` lints to `drop_in_place`](rust-lang/rust#160229)
- [`unfulfilled_lint_expectations` no longer fires on `#[expect(dead_code)]` inside code that is covered by a dead parent's diagnostic](rust-lang/rust#161005)
- [Turn the error for `repr(align)` fields in a `repr(packed)` type into a deny-by-default lint `aligned_fields_in_packed`](rust-lang/rust#162160)
- [volatile: allow accesses to non-AM memory to trap](rust-lang/rust#160564)

<a id="1.100.0-Compiler"></a>

## Compiler

- [Stabilize `-Cprofile-sample-use`](rust-lang/rust#155942)
- [Enable next solver by default in orphanck](rust-lang/rust#160668)

<a id="1.100.0-Platform-Support"></a>

## Platform Support

- [`i686-pc-windows-gnu` is now a tier 2 without host tools target](rust-lang/rust#161681)
- [Promote `wasm32-wasip3` to Tier 2](rust-lang/rust#161940)
- [Add new Tier 3 target `powerpc64-sony-ps3`](rust-lang/rust#162072)

Refer to Rust's [platform support page][platform-support-doc]
for more information on Rust's tiered platform support.

[platform-support-doc]: https://doc.rust-lang.org/rustc/platform-support.html

<a id="1.100.0-Libraries"></a>

## Libraries

- [Stabilize custom allocators](rust-lang/rust#156882)
- [Map `ENOTSUP` to `ErrorKind::Unsupported`](rust-lang/rust#158580)
- [Fix soundness issues in `std::sys::pal::sgx::waitqueue::unsafe_list`](rust-lang/rust#161334)

<a id="1.100.0-Stabilized-APIs"></a>

## Stabilized APIs

- [`impl PartialEq<Cow<'_, [U]>> for Vec<T, A>`](https://doc.rust-lang.org/stable/std/vec/struct.Vec.html#impl-PartialEq%3CCow%3C'_,+%5BU%5D%3E%3E-for-Vec%3CT,+A%3E)
- [`impl PartialEq<Cow<'_, [U]>> for &[T]`](https://doc.rust-lang.org/stable/std/primitive.slice.html#impl-PartialEq%3CCow%3C'_,+%5BU%5D%3E%3E-for-%26%5BT%5D)
- [`impl PartialEq<Cow<'_, [U]>> for &mut [T]`](https://doc.rust-lang.org/stable/std/primitive.slice.html#impl-PartialEq%3CCow%3C'_,+%5BU%5D%3E%3E-for-%26mut+%5BT%5D)
- [`std::alloc::Allocator`](https://doc.rust-lang.org/stable/std/alloc/trait.Allocator.html)
- [`std::alloc::Global`](https://doc.rust-lang.org/stable/std/alloc/struct.Global.html)
- [`std::alloc::System`](https://doc.rust-lang.org/stable/std/alloc/struct.System.html)
- [`impl Allocator for Global`](https://doc.rust-lang.org/stable/std/alloc/trait.Allocator.html#impl-Allocator-for-Global)
- [`impl Allocator for System`](https://doc.rust-lang.org/stable/std/alloc/trait.Allocator.html#impl-Allocator-for-System)
- [`impl<A: Allocator> Allocator for &A`](https://doc.rust-lang.org/stable/std/alloc/trait.Allocator.html#impl-Allocator-for-%26A)
- [`impl<T: Allocator, A: Allocator> Allocator for Box<T, A>`](https://doc.rust-lang.org/stable/std/alloc/trait.Allocator.html#impl-Allocator-for-Box%3CT,+A%3E)
- [`impl<A: Allocator> Allocator for &mut A`](https://doc.rust-lang.org/stable/std/alloc/trait.Allocator.html#impl-Allocator-for-%26mut+A)
- [`impl<T: Allocator, A: Allocator> Allocator for Arc<T, A>`](https://doc.rust-lang.org/stable/std/alloc/trait.Allocator.html#impl-Allocator-for-Arc%3CT,+A%3E)
- [`impl<T: Allocator, A: Allocator> Allocator for Rc<T, A>`](https://doc.rust-lang.org/stable/std/alloc/trait.Allocator.html#impl-Allocator-for-Rc%3CT,+A%3E)
- [`Box::new_in`](https://doc.rust-lang.org/stable/std/boxed/struct.Box.html#method.new_in)
- [`Box::from_raw_in`](https://doc.rust-lang.org/stable/std/boxed/struct.Box.html#method.from_raw_in)
- [`Box::from_non_null_in`](https://doc.rust-lang.org/stable/std/boxed/struct.Box.html#method.from_non_null_in)
- [`Box::into_raw_with_allocator`](https://doc.rust-lang.org/stable/std/boxed/struct.Box.html#method.into_raw_with_allocator)
- [`Box::into_non_null_with_allocator`](https://doc.rust-lang.org/stable/std/boxed/struct.Box.html#method.into_non_null_with_allocator)
- [`Box::allocator`](https://doc.rust-lang.org/stable/std/boxed/struct.Box.html#method.allocator)
- [`Vec::new_in`](https://doc.rust-lang.org/stable/std/vec/struct.Vec.html#method.new_in)
- [`Vec::with_capacity_in`](https://doc.rust-lang.org/stable/std/vec/struct.Vec.html#method.with_capacity_in)
- [`Vec::from_raw_parts_in`](https://doc.rust-lang.org/stable/std/vec/struct.Vec.html#method.from_raw_parts_in)
- [`Vec::from_parts_in`](https://doc.rust-lang.org/stable/std/vec/struct.Vec.html#method.from_parts_in)
- [`Vec::into_raw_parts_with_allocator`](https://doc.rust-lang.org/stable/std/vec/struct.Vec.html#method.into_raw_parts_with_allocator)
- [`Vec::into_parts_with_allocator`](https://doc.rust-lang.org/stable/std/vec/struct.Vec.html#method.into_parts_with_allocator)
- [`Vec::allocator`](https://doc.rust-lang.org/stable/std/vec/struct.Vec.html#method.allocator)
- [`Child::main_thread_handle`](https://doc.rust-lang.org/stable/std/os/windows/process/trait.ChildExt.html#tymethod.main_thread_handle)
- [`impl Default for std::sync::Once`](https://doc.rust-lang.org/stable/std/sync/struct.Once.html#impl-Default-for-Once)
- [`bool::toggle`](https://doc.rust-lang.org/stable/std/primitive.bool.html#method.toggle)
- [`Box::take`](https://doc.rust-lang.org/stable/std/boxed/struct.Box.html#method.take)
- [`Box::map`](https://doc.rust-lang.org/stable/std/boxed/struct.Box.html#method.map)
- [`Rc::map`](https://doc.rust-lang.org/stable/std/rc/struct.Rc.html#method.map)
- [`Arc::map`](https://doc.rust-lang.org/stable/std/sync/struct.Arc.html#method.map)
- [`impl AsRef<T> for !`](https://doc.rust-lang.org/stable/std/primitive.never.html#impl-AsRef<T>-for-!)
- [`impl AsMut<T> for !`](https://doc.rust-lang.org/stable/std/primitive.never.html#impl-AsMut<T>-for-!)
- [`core::mem::DropGuard`](https://doc.rust-lang.org/stable/core/mem/struct.DropGuard.html)
- [`core::mem::conjure_zst`](https://doc.rust-lang.org/stable/core/mem/fn.conjure_zst.html)
- [`UnsafeCell::replace`](https://doc.rust-lang.org/stable/std/cell/struct.UnsafeCell.html#method.replace)
- [`UnsafeCell::as_ref_unchecked`](https://doc.rust-lang.org/stable/std/cell/struct.UnsafeCell.html#method.as_ref_unchecked)
- [`UnsafeCell::as_mut_unchecked`](https://doc.rust-lang.org/stable/std/cell/struct.UnsafeCell.html#method.as_mut_unchecked)
- [`str::trim_prefix`](https://doc.rust-lang.org/stable/std/primitive.str.html#method.trim_prefix)
- [`str::trim_suffix`](https://doc.rust-lang.org/stable/std/primitive.str.html#method.trim_suffix)
- [`[T]::trim_prefix`](https://doc.rust-lang.org/stable/std/primitive.slice.html#method.trim_prefix)
- [`[T]::trim_suffix`](https://doc.rust-lang.org/stable/std/primitive.slice.html#method.trim_suffix)
- [`Path::trim_prefix`](https://doc.rust-lang.org/stable/std/path/struct.Path.html#method.trim_prefix)
- [`Vec::from_fn`](https://doc.rust-lang.org/stable/std/vec/struct.Vec.html#method.from_fn)
- [`os::windows::process::CommandExt::show_window`](https://doc.rust-lang.org/stable/std/os/windows/process/trait.CommandExt.html#tymethod.show_window)

<a id="1.100.0-Cargo"></a>

## Cargo

- Introduced Cargo's own linting system: some Cargo warnings are now emitted as lints that users can control in the `[lints.cargo]` table. This includes a new built-in unused dependency check via the `cargo::unused_dependencies` lint. [docs](https://doc.rust-lang.org/stable/cargo/reference/lints.html) [#&#8203;17298](rust-lang/cargo#17298)
- Introduced minimum publish age configurations, also known as dependency cooldowns. When the relevant config is set, the resolver ignores versions published more recently than that, unless they are already in `Cargo.lock`. ([RFC 3923](https://rust-lang.github.io/rfcs/3923-cargo-min-publish-age.html)) [docs](https://doc.rust-lang.org/stable/cargo/reference/resolver.html#publish-age) [#&#8203;17335](rust-lang/cargo#17335)
- cargo-install: now uses the existing lockfile in the `.crate` tarball by default. `--locked` in cargo install becomes a no-op. [#&#8203;17388](rust-lang/cargo#17388)
- Cargo now uses a new directory layout for intermediate build artifacts. Tools that inspect the build directory may need to use [Cargo’s JSON messages](https://doc.rust-lang.org/stable/cargo/reference/external-tools.html#json-messages) to locate build artifacts instead of relying on the build directory layout. The layout is not a stable interface and is subject to change. ([build cache doc](https://doc.rust-lang.org/stable/cargo/reference/build-cache.html)) [#&#8203;17354](rust-lang/cargo#17354)

## Rustdoc

- [Add new `invalid_markdown_table` rustdoc lint](rust-lang/rust#159583)

<a id="1.100.0-Compatibility-Notes"></a>

## Compatibility Notes

- [Closures now more precisely capture variables used in `if let`. This may cause new errors](rust-lang/rust#154210)
- [Check dyn-compatibility of trait objects in more places](rust-lang/rust#154992)
- [`Infallible` is now a type alias to `!`](rust-lang/rust#155499)
- [The never type fallback was changed to `!` on all editions](rust-lang/rust#155499)
- [`box` patterns are no longer syntactically allowed](rust-lang/rust#156749)
- [Report Query Cycle errors in more cases when computing the layout of enums with explicit discriminants](rust-lang/rust#157562)
- [Always escape grapheme extenders in `str::escape_debug`](rust-lang/rust#158303)
- [Make let-else respect `macro_rules` `expr` metavariable grouping](rust-lang/rust#158515)
- [`Iterator::{min,max}(_by_key)` changed which `Ord` methods they use.](rust-lang/rust#160203) This cannot change behaviour (other than being potentially faster) for types correctly following the [`Ord` rules](https://doc.rust-lang.org/std/cmp/trait.Ord.html), but may impact types with inconsistent trait implementations.
- [Emit an error when trying to enable SSE/AVX on an x86 (32bit or 64bit) softfloat target](rust-lang/rust#160302)
- [Require windowed (and exception) for Xtensa ABI](rust-lang/rust#160643)
- [windows-gnullvm: always link libunwind statically](rust-lang/rust#160712)
- [From version 1.94 up to 1.100 a number of ARMv7-A hardfloat targets required the `VFPv3-D32` FPU as a minimum, as they erroneously had the `d32` feature in their baseline list of features. Breakage introduced as a result of correcting this can be fixed by passing `-Ctarget-feature=+d32` to Rust.](rust-lang/rust#160911)
- [Change "Rust" ABI on x86 to use SSE registers if they are always-available for the current target](rust-lang/rust#161583)
- [Make the `ambiguous_glob_imported_traits` lint fire in slightly more cases](rust-lang/rust#161805)
- [Make `+fix-cortex-a53-835769` a default feature for `aarch64-unknown-fuchsia`](rust-lang/rust#161886)
- [Some impls on `Box` have been generalised to arbitrary allocators, which may cause new type inference errors](rust-lang/rust#161946)
- [The standard library now uses Unicode version 18.0.0](https://doc.rust-lang.org/stable/std/primitive.char.html#associatedconstant.UNICODE_VERSION)
- [WASI SDK version was bumped from 33 to 34](rust-lang/rust#163809)
- [On ARM targets, `-Ctarget-feature`/`-Ctarget-cpu` values that would alter the ABI are rejected as hard errors now.](rust-lang/rust#161280)

<a id="1.100.0-Internal-Changes"></a>

## Other

- [Test harness now allows passing `--test-threads` and `--color` multiple times, with later arguments overriding earlier ones](rust-lang/rust#161312)

</details>

---

### Configuration

πŸ“… **Schedule**: (UTC)

- Branch creation
  - "before 9am on tuesday"
- Automerge
  - At any time (no schedule defined)

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

β™» **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

πŸ”• **Ignore**: Close this PR and you won't be reminded about these updates again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Mend Renovate CLI](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4yMjcuNCIsInVwZGF0ZWRJblZlciI6IjQ0LjIyNy40IiwidGFyZ2V0QnJhbmNoIjoiZGV2ZWxvcCIsImxhYmVscyI6WyJkZXBlbmRlbmNpZXMiLCJyZW5vdmF0ZSJdfQ==-->

Reviewed-on: https://code.futo.org/harbor/harbor/pulls/2356
Reviewed-by: Thomas de Zeeuw <thomas@futo.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

disposition-merge This issue / PR is in PFCP or FCP with a disposition to merge it. finished-final-comment-period The final comment period is finished for this PR / Issue. 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. to-announce Announce this issue on triage meeting

Projects

None yet

Development

Successfully merging this pull request may close these issues.