Skip to content

Rollup of 7 pull requests#158266

Closed
JonathanBrouwer wants to merge 16 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-zVReYNF
Closed

Rollup of 7 pull requests#158266
JonathanBrouwer wants to merge 16 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-zVReYNF

Conversation

@JonathanBrouwer

Copy link
Copy Markdown
Contributor

Successful merges:

r? @ghost

Create a similar rollup

aDotInTheVoid and others added 16 commits May 31, 2026 15:58
This is motivated by cargo-semver-checks wanting to work on the standard
library, but that requires being able to filter out breaking changes to
unstable items, so it can only flag breaking changes to stable items.
This in turn is motivated by
https://www.github.com/rust-lang/rust/issues/153486.
For s390x the vector registers are now stable. That they need the target feature is already part of the ERROR assertion
On wasm the crate metadata ends up in a custom section. It is not
possible to refer to create symbols inside a custom section, so
attempting to export it during linking will result in a linker error.
This keeps the target spec flag to deny compiling rust dylibs for wasm,
but may theoretically allow compiling wasm rust dylibs with a custom
target spec. It will help with wasm proc-macros. And in the future we
can try to flip the only-cdylib option to false on wasm.
…ure-restriction, r=WaffleLapkin

Lift the same-signature restriction for `extern "tail"`

tracking issue: rust-lang#157427

The `extern "tail"` calling convention uses callee cleanup (i.e. the callee restores the stack, not the caller). Hence, the same-signature restriction that is normally required to codegen tail calls does not apply.

We need the ABI to deviate from `extern "Rust"` to make sure indirect arguments are passed by stack offset, not via a pointer into the caller's stack frame (the value would potentially be overwritten). For standard tail calls we work around this problem by storing the value in the caller's caller, but for `extern "tail"` that doesn't work reliably because the signatures can be different.

I'm not sure about unsized arguments. That feature seems really broken, so I'm not sure how much work we should put into trying to do something reasonable there. Fundamentally I don't think we can support unsized arguments in `extern "tail"` calls.

Also we can't really promote using this yet due to `tailcc` being a bit broken on LLVM 22 on x86_64.

r? WaffleLapkin
cc @bjorn3
…=Mark-Simulacrum

Fix linking for wasm with crate metadata included

On wasm the crate metadata ends up in a custom section. It is not possible to refer to create symbols inside a custom section, so attempting to export it during linking will result in a linker error. This keeps the target spec flag to deny compiling rust dylibs for wasm, but may theoretically allow compiling wasm rust dylibs with a custom target spec. It will help with wasm proc-macros. And in the future we can try to flip the only-cdylib option to false on wasm.

Extracted out of rust-lang#157709, but also helps with rust-lang#157590.

r? @Mark-Simulacrum
…efactoring, r=petrochenkov

Refactor `proc_macro_decls_static`

During experiments in rust-lang#158024 I've noticed that we iterate over all `hir_free_items` and find `RustcProcMacroDecls` on each of them for rewrite of a single `Option` which is the result of the query.

In this PR:

- The seach for `RustcProcMacroDecls` attribute is moved into `hir_crate_items` and result is cached in `ModuleItems`, now we do not find `RustcProcMacroDecls` for each free item, we stop when it is found,
- ~`self.crate_collector` is replaced with generic const `CRATE_COLLECTOR`, maybe will give perf. improvements.~

r? @petrochenkov
…mments, r=camelid

update `asm_experimental_reg` comments

Trivial bit of cleanup.

For s390x the vector registers are now stable, so `asm_experimental_reg` is no longer needed. That they need the target feature is already part of the ERROR assertion.

In the unstable book the title was incorrect.
…oc-json, r=GuillaumeGomez

Include `Item::stability` info in rustdoc JSON.

Include `Item::stability` info in rustdoc JSON, to enable tools like `cargo-semver-checks` to compute stability information and (eventually, soon™️) be used to catch accidental breaking changes in the Rust standard library (cc @Amanieu).

Successor to rust-lang#154603 by @aDotInTheVoid, building directly on top of its commit.

Differences relative to that PR:
- Added `since` information for stable items.
- `Stability` is now boxed to ensure a smaller bump in `Item` size. Most non-built-in crates won't have stability information, so minimizing that memory use is material for them.
- We have well-defined stability semantics for items, optimizing for consistency with how existing JSON users already must perform reachability and `#[doc(hidden)]` analysis, instead of how rustdoc HTML presentation works. Note the detailed inline comment about this.
- Tests and docs, which the original PR noted needed to be added.

Other flavors of stability, such as const stability or default-body stability, are left as future work.

r? @GuillaumeGomez

**AI disclosure:** This PR is the product of a combination of manual work and AI tools. I secured approval in advance from the designated reviewer. I stand behind the quality of the code I'm submitting, and I vouch it's as good or better compared to if I had written every line by my own hand.
Use an unexpanded span for actually written down opt out params

I'm trying to land the components of rust-lang#158122 individually now (and fixing the bugs in the process).

TLDR: we didn't use the span of `?Sized` for generating other default bounds of the sized hierarchy, causing in funky diagnostics, this PR fixes that
…davidtwco

Change compiler leads in triagebot.toml

r? @davidtwco
@rust-bors rust-bors Bot added the rollup A PR which is a rollup label Jun 22, 2026
@rustbot rustbot added A-meta Area: Issues & PRs about the rust-lang/rust repository itself A-rustdoc-json Area: Rustdoc JSON backend F-explicit_tail_calls `#![feature(explicit_tail_calls)]` S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Jun 22, 2026
@JonathanBrouwer

Copy link
Copy Markdown
Contributor Author

@bors r+ rollup=never p=5

@rust-bors

rust-bors Bot commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 8ee4847 has been approved by JonathanBrouwer

It is now in the queue for this repository.

@rust-bors rust-bors Bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jun 22, 2026
@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Jun 22, 2026
…uwer

Rollup of 7 pull requests

Successful merges:

 - #157983 (Lift the same-signature restriction for `extern "tail"`)
 - #158242 (Fix linking for wasm with crate metadata included)
 - #158119 (Refactor `proc_macro_decls_static`)
 - #158172 (update `asm_experimental_reg` comments)
 - #158230 (Include `Item::stability` info in rustdoc JSON.)
 - #158258 (Use an unexpanded span for actually written down opt out params)
 - #158262 (Change compiler leads in triagebot.toml)
@rust-log-analyzer

Copy link
Copy Markdown
Collaborator

The job x86_64-gnu-nopt failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
failures:

---- [ui] tests/ui/explicit-tail-calls/tailcc-no-signature-restriction.rs#x86_64 stdout ----

error in revision `x86_64`: test did not exit with success! code=Some(101) so test would pass with `run-fail`
status: exit status: 101
command: cd "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/explicit-tail-calls/tailcc-no-signature-restriction.x86_64" && RUSTC="/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" RUST_TEST_THREADS="4" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/explicit-tail-calls/tailcc-no-signature-restriction.x86_64/a"
stdout: none
--- stderr -------------------------------

thread 'main' (137028) panicked at /checkout/tests/ui/explicit-tail-calls/tailcc-no-signature-restriction.rs:43:5:
assertion `left == right` failed

@rust-bors rust-bors Bot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jun 22, 2026
@rust-bors

rust-bors Bot commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

💔 Test for 4dd5d59 failed: CI. Failed job:

@rust-bors rust-bors Bot added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Jun 22, 2026
@rust-bors

rust-bors Bot commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

PR #157983, which is a member of this rollup, was unapproved.

@rust-bors rust-bors Bot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jun 22, 2026
@rustbot rustbot removed the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Jun 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-meta Area: Issues & PRs about the rust-lang/rust repository itself A-rustdoc-json Area: Rustdoc JSON backend F-explicit_tail_calls `#![feature(explicit_tail_calls)]` rollup A PR which is a rollup T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants