Rollup of 14 pull requests - #160954
Open
jhpratt wants to merge 36 commits into
Open
Conversation
This commit adjusts the changes made in 159733. A wasi-libc bug was discovered in 160828 which is present in certain situations which means that the changes in 159733 expose this bug. The purpose of this PR is to get wasip1/wasip2 targets fixed again while preserving a working implementation for wasip3. This upstream bug is already fixed in wasi-libc meaning that this PR won't be necessary once wasi-sdk-34 is published and used in rust-lang/rust. Until that time, however, this effectively reverts 159733 for wasip1/wasip2. The wasip3 target is Tier 3 still and requires wasi-sdk-34 anyway which is why that's left unchanged. Closes 160828
the previous version, v0.5.0 (from 2018), does not include a Cargo lockfile which makes the test brittle as bugs and unintentional breaking changes in any new release of a dependency can make the test fail the newly chosen version, v0.7.7, includes a Cargo lockfile
This is currently not really implemented, but partial support for it is added in various places across the tree. This is a patch extracted from the wider set of work to make review easier, which wires up: * Unstable flag in rustc * Bootstrap flag to enable using wasm-proc-macros (this needs an extra std compilation, wiring into compiletest) * Partial compiletest support for the flag (mostly just CLI side of things)
Simply replace the parameter name and `#[rustc_splat]` attribute with an ellipsis. This preserves the type information of the splat while still documenting the variadic nature of the function.
Do not pass `-no-pie` on Windows The warning can be seen with a simple example: ``` ❯ cargo new /tmp/hello -q ❯ cargo rustc --target x86_64-pc-windows-gnullvm -q -- -C target-feature=+crt-static warning: linker stderr: clang: argument unused during compilation: '-no-pie' [-Wunused-command-line-argument] | = note: `#[warn(linker_messages)]` on by default ```
…oboet
Arc: Remove unnecessary fmt::Display use for overflow assertion
- [x] I did not use an LLM to create a change in this PR.
- [ ] I used an LLM to create a change in this PR, and I have explained below how it was used.
This PR removes unnecessary `fmt::Display` generated assembly because of use of formatting in the overflow check assertion(`assert!(n <= MAX_REFCOUNT, "{}", INTERNAL_OVERFLOW_ERROR);`).
This reduces generated x64 assembly for counter increment(simplified) from:
```asm
increase_counter:
test rdi, rdi
js .LBB1_2
inc rdi
mov rax, rdi
ret
.LBB1_2:
sub rsp, 24
lea rax, [rip + .Lanon.642d46026bcfa00bfed8baf8cdbf502d.2]
mov qword ptr [rsp + 8], rax
lea rax, [rip + <&str as core[4e7ceada952a6ea0]::fmt::Display>::fmt]
mov qword ptr [rsp + 16], rax
lea rdi, [rip + .Lanon.642d46026bcfa00bfed8baf8cdbf502d.0]
lea rdx, [rip + .Lanon.642d46026bcfa00bfed8baf8cdbf502d.4]
lea rsi, [rsp + 8]
call qword ptr [rip + core[4e7ceada952a6ea0]::panicking::panic_fmt@GOTPCREL]
.Lanon.642d46026bcfa00bfed8baf8cdbf502d.0:
.asciz "\300"
.Lanon.642d46026bcfa00bfed8baf8cdbf502d.1:
.ascii "Arc counter overflow"
```
To:
```asm
increase_counter:
test rdi, rdi
js .LBB0_2
inc rdi
mov rax, rdi
ret
.LBB0_2:
push rax
lea rdi, [rip + .Lanon.642d46026bcfa00bfed8baf8cdbf502d.0]
lea rdx, [rip + .Lanon.642d46026bcfa00bfed8baf8cdbf502d.2]
mov esi, 41
call qword ptr [rip + core[4e7ceada952a6ea0]::panicking::panic_fmt@GOTPCREL]
.Lanon.642d46026bcfa00bfed8baf8cdbf502d.0:
.ascii "Arc counter overflow"
```
Godbolt link:
https://godbolt.org/z/3qjxooYWM
I expect bors to report a binary size reduction for all programs using Arc. There might also be performance improvements as a byproduct of CPU cache hit increase.
…, r=bjorn3,jieyouxu Add -Zwasm-proc-macros flag This is currently not really implemented, but partial support for it is added in various places across the tree. This is a patch extracted from the wider set of work to make review easier, which wires up: * Unstable flag in rustc * Bootstrap flag to enable using wasm-proc-macros (this needs an extra std compilation, wiring into compiletest) * Partial compiletest support for the flag (mostly just CLI side of things) * I suspect this will not work across all platforms but based on success with the full patch it should be enough for Linux, I think. I'd rather get them working on at least one platform and then iterate from there, unless we have clear ideas for improvements now. cc rust-lang#160389 (tracking issue) cc rust-lang#157590 (more complete implementation) r? @bjorn3
…, r=clarfonthey std: Adjust cfgs again for TLS on WASI This commit adjusts the changes made in rust-lang#159733. A wasi-libc bug was discovered in rust-lang#160828 which is present in certain situations which means that the changes in rust-lang#159733 expose this bug. The purpose of this PR is to get wasip1/wasip2 targets fixed again while preserving a working implementation for wasip3. This upstream bug is already fixed in wasi-libc meaning that this PR won't be necessary once wasi-sdk-34 is published and used in rust-lang/rust. Until that time, however, this effectively reverts rust-lang#159733 for wasip1/wasip2. The wasip3 target is Tier 3 still and requires wasi-sdk-34 anyway which is why that's left unchanged. Closes rust-lang#160828
…is, r=GuillaumeGomez Add basic `splat` support to `rustdoc` Tracking Issue: rust-lang#153629 # Description While experimenting on variadic `min`/`max`, it was [noted](rust-lang/libs-team#848 (comment)) that the `rustdoc` output for a splatted function is less than ideal. Consider the below: ```rust pub fn smallest<T: Ord>(#[rustc_splat] vals: impl TupleReduce<Item = T>) -> T { // ... } ``` Currently, this is rendered in `rustdoc` as-is, obfuscating the variadic nature of the function: <img width="819" height="211" alt="image" src="https://github.com/user-attachments/assets/68569fe6-7285-49f8-aae9-ddad0b10649c" /> ## Solution I've updated the clean `Parameter` type to include whether it is splatted, and overridden the display of that parameter to replace the name with an ellipsis, similar to how fake variadic implementations are displayed. <img width="820" height="211" alt="image" src="https://github.com/user-attachments/assets/58a27245-cc38-44e6-908a-f67991bcdb64" /> --- ## Notes * No AI tooling of any kind was used during the creation of this PR.
…ulacrum Allow running an arbitrary number of try jobs per PR Requested on [Zulip](https://rust-lang.zulipchat.com/#narrow/channel/242791-t-infra/topic/bors.20try.20job.20nolimit/with/615782805). Companion bors PR: rust-lang/bors#812
rustc-book: update sys-v abi link Upstream has moved to a new location and the current link is 6 years out of date. See https://github.com/hjl-tools/x86-psABI/
…-cfg, r=Urgau Add rust_analyzer to check-cfg names Add rust_analyzer as a known cfg name, set to expect no values Add test to verify name is recognized and warned on setting a value Fixes rust-lang#160736 r? @Urgau
rustdoc: Fix invalid CSS classes generated for notable items Just realized that the background for the notable traits was not set because the jinja template was not wrong: <img width="306" height="122" alt="Screenshot From 2026-08-11 17-15-34" src="https://github.com/user-attachments/assets/57d6b20d-25bd-4142-9ea7-8c56d7442723" /> With this fix it looks as expected: <img width="306" height="122" alt="Screenshot From 2026-08-11 17-16-21" src="https://github.com/user-attachments/assets/d3d7ea6f-c562-447f-94bb-91c80b299d90" /> Follow-up of rust-lang#157058. r? @Urgau
split up `rustc_session` Followup on rust-lang#160336 cc @JonathanBrouwer (feel free to review if you want) The first commit splits out the `cstore` module from `rustc_session` into its own crate. `rustc_session` actually never used it anywhere internally, and there are also several crates that only depend on `rustc_session` for it. So it is a natural candidate to split off. The second commit is similar; `rustc_hir::definitions` is moved to `rustc_hir_id`; it is used nowhere in `rustc_hir`, except to implement an inherent method: ```rust impl DefKind { pub fn def_path_data(self, name: Option<Symbol>) -> DefPathData { } } ``` which is used (once) in rustc_middle, so the items in `rustc_hir::definitions` and this conversion function could be in many places. `rustc_hir_id` is the earliest and the easiest, so that's what I went with. Together these allow `rustc_crate_store`, `rustc_hir` and `rustc_session` to compile in parallel. Current graph: <img width="825" height="617" alt="image" src="https://github.com/user-attachments/assets/aa954265-0057-4596-a7c4-38290937fb74" /> Graph after this pr: <img width="853" height="572" alt="image" src="https://github.com/user-attachments/assets/9bcd16f8-897c-4990-920b-249500b2e78e" />
…loc-reenter, r=nia-e Ensure TLS accesses don't call the global allocator through panic Fixes rust-lang#160930 That issue is much more simple to fix than the other reentrancy issues, since only thread locals use the TLS code. We can just replace all the assertions with their `rt` versions that do not call the global allocator. r? libs
Store the names of `Fn` trait parameters in the AST, fix rustfmt bug This PR stores the name of a `Fn` trait parameters in the AST. This is needed because * rustfmt needs to rewrite it. * this will also be needed in a follow-up PR to do semantic validation. This PR is split up in commits for reviewability: * `Make inputs to ParenthesizedArgs a ThinVec<Param> in the compiler` changes the AST datatypes, should have no observable effect * `Fix errors in tooling` deals with the consequenses of the first commit in tooling, should have no observable effect * `Improve rewrite_generic_args to take pattern into account` fixes rust-lang/rustfmt#7021 * `Add rustfmt regression test` regression test for rust-lang/rustfmt#7021 I have not worked in the rustfmt codebase before so please review this part carefully. Tracking issue: rust-lang#158499 cc @ytmimi @JohnTitor
Member
Author
Contributor
rust-bors Bot
pushed a commit
that referenced
this pull request
Aug 12, 2026
Rollup of 14 pull requests try-job: dist-various-1 try-job: test-various try-job: x86_64-gnu-aux try-job: x86_64-gnu-llvm-21-3 try-job: x86_64-msvc-1 try-job: aarch64-apple-* try-job: x86_64-mingw-1 try-job: i686-msvc-*
This comment has been minimized.
This comment has been minimized.
Contributor
|
⌛ Testing commit 329e321 with merge 793b589... Workflow: https://github.com/rust-lang/rust/actions/runs/31558301235 |
rust-bors Bot
pushed a commit
that referenced
this pull request
Aug 12, 2026
Rollup of 14 pull requests Successful merges: - #160620 (Do not pass `-no-pie` on Windows) - #160731 (Arc: Remove unnecessary fmt::Display use for overflow assertion) - #160854 (Add -Zwasm-proc-macros flag) - #160868 (std: Adjust cfgs again for TLS on WASI) - #160882 (Add basic `splat` support to `rustdoc`) - #160894 (Allow running an arbitrary number of try jobs per PR) - #160790 (rustc-book: update sys-v abi link) - #160878 (Add rust_analyzer to check-cfg names) - #160909 (tests/run-make-cargo/thumb-none-cortex-m: bump `cortex-m` dependency) - #160920 (No longer mention the removed generic) - #160921 (rustdoc: Fix invalid CSS classes generated for notable items) - #160924 (split up `rustc_session`) - #160934 (Ensure TLS accesses don't call the global allocator through panic) - #160937 (Store the names of `Fn` trait parameters in the AST, fix rustfmt bug)
Collaborator
|
The job Click to see the possible cause of the failure (guessed by this bot) |
Contributor
|
💔 Test for dff5826 failed: CI. Failed job:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Successful merges:
-no-pieon Windows #160620 (Do not pass-no-pieon Windows)splatsupport torustdoc#160882 (Add basicsplatsupport torustdoc)cortex-mdependency #160909 (tests/run-make-cargo/thumb-none-cortex-m: bumpcortex-mdependency)rustc_session#160924 (split uprustc_session)Fntrait parameters in the AST, fix rustfmt bug #160937 (Store the names ofFntrait parameters in the AST, fix rustfmt bug)r? @ghost
Create a similar rollup