Skip to content

Rollup of 8 pull requests - #165775

Closed
JonathanBrouwer wants to merge 20 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-Gf3iR9q
Closed

JonathanBrouwer wants to merge 20 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-Gf3iR9q

Conversation

@JonathanBrouwer

Copy link
Copy Markdown
Member

Successful merges:

r? @ghost

Create a similar rollup

panstromek and others added 20 commits November 8, 2026 15:11
In BPF, available set of atomic instructions depends on CPU version.
Make the compiler aware of that distinction by adding the new field
`per_cpu_atomic_widths`, then honor its value above `min_atomic_width`
and `max_atomic_width`.

Previously, we assumed availability of 64-bit acquire/release atomics
for BPF, but that's not true for the v3/generic CPU (and older). In
effect, `core::io::Error` failed to compile at ISel with `Cannot select:
... AtomicLoad`.

rust-lang#135175 proposes making BPF
target emit BPF binaries. That requires ability to build entire core
library. This change partially fixes the issue.

Code in this change is generated by (an open-weight and self-hosted)
LLM, it was agreed on in the Zulip thread [0], where @nagisa volunteered
as a reviewer.

[0] https://rust-lang.zulipchat.com/#narrow/channel/606558-llm-reviews/topic/Seeking.20review.20for.20BPF.20bytecode.20linking.20.28issue.20.23135175.29/near/631892496
Co-authored-by: León Orell Valerian Liehr <me@fmease.dev>
…,fmease

Support underscore as associated const name in inherent impls

This PR doesn't change the current behavior of the `dead_code` lint for unused associated consts with underscore-prefixed names and treats associated consts named `_` consistently.

There might still be some places that should've been changed to use `named_items_in_definition_order()` instead of `in_definition_order()`, though I'm not quite sure.

[The RFC](https://github.com/dtolnay/rfcs/blob/assocunderscore/text/0000-associated-const-underscore.md#reference-level-explanation) does not propose const underscore inside traits or trait impls, so this PR only implements support for const underscore in inherent impls.

Unresolved questions:
- Whether to lint `impl Private { pub const _: Private = Private; }`, where the visibility qualifier here has no effect. It seems like there wasn't any disagreement on linting this, though what's proposed in the RFC currently diverges from that: [RFC: Associated const underscore](https://github.com/dtolnay/rfcs/blob/assocunderscore/text/0000-associated-const-underscore.md#reference-level-explanation).

Tracking:
- rust-lang#158944
BPF: Define max/min atomic width per CPU version

In BPF, available set of atomic instructions depends on CPU version. Make the compiler aware of that distinction by adding the new field `per_cpu_atomic_widths`, then honor its value above `min_atomic_width` and `max_atomic_width`.

Previously, we assumed availability of 64-bit acquire/release atomics for BPF, but that's not true for the v3/generic CPU. In effect, `core::io::Error` failed to compile at ISel with `Cannot select: ... AtomicLoad`.

rust-lang#135175 proposes making BPF target emit BPF binaries. That requires ability to build entire core library. This change partially fixes the issue.

Code in this change is generated by (an open-weight and self-hosted) LLM, it was agreed on in the Zulip thread [0], where @nagisa volunteered as a reviewer.

Fixes: rust-lang#165349

[0] https://rust-lang.zulipchat.com/#narrow/channel/606558-llm-reviews/topic/Seeking.20review.20for.20BPF.20bytecode.20linking.20.28issue.20.23135175.29/near/631892496

r? @nagisa
… r=oli-obk

Avoid terminator: None in MIR building

Another step towards changing `Option<Terminator>` to `Terminator` in `BasicBlockData`. More info in [this thread](https://rust-lang.zulipchat.com/#narrow/channel/131828-t-compiler/topic/vibe.20check.20-.20removing.20Option.20from.20Terminator/with/637588808).

MIR building sometimes needs to keep blocks unterminated, so we model this explicitly outside of the `BasicBlockData` structure by using `Either<BasicBlockData, UnterminatedBlockData>`. Notably, this type has the same layout as `BasicBlockData`, so we don't need to reallocate when finalizing the MIR body.

The relevant perf run is [the first one](rust-lang#165611 (comment)), the improvement is noise.

I also tried using custom block representation that would keep terminator optional in [the second perf run](rust-lang#165611 (comment)), but it was a regression, because the blocks have to be reallocated and copied when building is finished. See rust-lang#165611 (comment) for the analysis.
…miasko

Improve duplicate attribute diagnostics for active built-in attributes

Can be reviewed commit by commit, every commit passes tests.

This PR uses the same diagnostic that is used in attribute parsing, so it makes things more consistent and prettier.
…rary, r=Kobzol

Fix `x bench library/std`

Since rust-lang#149514, bootstrap was building std with the dist profile, but still using the default profile for `cargo bench`. This PR fixes that by ensuring that operations on std always use the dist profile.
…r-anchor, r=GuillaumeGomez

[rustdoc-frontend] Properly clear search state when sidebar link is clicked

Small fix (and test) for a bug I accidentally ran into.

Repro steps:
- Go to the i8 primitive's page (as an example, bug is not related to the specific page)
- Click the search button to open the search bar
- The search button gets replaced by the "exit" button
- Click any anchor link from the sidebar
- End up with the search bar closed but the button is still in the "exit" mode and not "search" mode, see screenshot:
<img width="2234" height="482" alt="image" src="https://github.com/user-attachments/assets/8b887caf-d4da-4298-96e9-bd2e884c3430" />
…, r=joboet

Disable no_threads compiler errors for Trusty targets

rust-lang#158782 introduced compile-time checks to verify that targets using the no-thread implementation of sync primitives are actually marked single-threaded. This broke the Trusty targets, which are not marked single-threaded but are using the no-threads implementations. Trusty userspace doesn't have threads, but we can't mark the target single-threaded because we need atomic operations for shared-memory IPC. This PR adds an exception to the `#[cfg]` on the `compile_error!` to allow Trusty to use the no-thread sync implementations.

Fixes rust-lang#165596
…=Urgau

rustdoc: Rename `--show-coverage` CLI flag into `--coverage`

Fixes rust-lang#159691.

r? @Urgau
@rust-bors rust-bors Bot added the rollup A PR which is a rollup label Nov 10, 2026
@rustbot rustbot added A-attributes Area: Attributes (`#[…]`, `#![…]`) A-run-make Area: port run-make Makefiles to rmake.rs A-rustc-dev-guide Area: rustc-dev-guide A-rustdoc-js Area: Rustdoc's JS front-end A-rustdoc-json Area: Rustdoc JSON backend A-test-infra-minicore Area: `minicore` test auxiliary and `//@ add-minicore` A-thread Area: `std::thread` S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) labels Nov 10, 2026
@rustbot rustbot added T-clippy Relevant to the Clippy team. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library 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. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output. labels Nov 10, 2026
@JonathanBrouwer

Copy link
Copy Markdown
Member Author

@bors r+ p=5 force

Trying commonly failed jobs
@bors try jobs=dist-various-1,test-various,test-x86_64-gnu-aux,test-x86_64-msvc-1,test-aarch64-apple-1,test-aarch64-apple-2,test-x86_64-mingw-1,test-i686-msvc,test-armhf-gnu,test-x86_64-gnu-llvm-22-3,test-aarch64-msvc-2

@rust-bors

rust-bors Bot commented Nov 10, 2026

Copy link
Copy Markdown
Contributor

📌 Commit a79befd 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 Nov 10, 2026
@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Nov 10, 2026
Rollup of 8 pull requests


try-job: dist-various-1
try-job: test-various
try-job: test-x86_64-gnu-aux
try-job: test-x86_64-msvc-1
try-job: test-aarch64-apple-1
try-job: test-aarch64-apple-2
try-job: test-x86_64-mingw-1
try-job: test-i686-msvc
try-job: test-armhf-gnu
try-job: test-x86_64-gnu-llvm-22-3
try-job: test-aarch64-msvc-2
@rust-bors

This comment has been minimized.

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

Rollup of 8 pull requests

Successful merges:

 - #158970 (Support underscore as associated const name in inherent impls)
 - #165192 (BPF: Define max/min atomic width per CPU version)
 - #165611 (Avoid terminator: None in MIR building)
 - #165749 (Improve duplicate attribute diagnostics for active built-in attributes)
 - #165762 (Fix `x bench library/std`)
 - #165726 ([rustdoc-frontend] Properly clear search state when sidebar link is clicked)
 - #165728 (Disable no_threads compiler errors for Trusty targets)
 - #165754 (rustdoc: Rename `--show-coverage` CLI flag into `--coverage`)
@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 Nov 10, 2026
@rust-bors

rust-bors Bot commented Nov 10, 2026

Copy link
Copy Markdown
Contributor

💔 Test for ca41e2f 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 Nov 10, 2026
@rust-bors

rust-bors Bot commented Nov 10, 2026

Copy link
Copy Markdown
Contributor

PR #158970, 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 Nov 10, 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 Nov 10, 2026
@rust-log-analyzer

Copy link
Copy Markdown
Collaborator

The job test-pr-check-2 failed! Check out the build log: (web) (plain enhanced) (plain)

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

@rust-bors

rust-bors Bot commented Nov 10, 2026

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: e37a55d (e37a55d1c51dd8117cf330e09355295f8ef7d77e)
Base parent: b6c79e8 (b6c79e88af6825838aed7c6a159e7e0b00259443)

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

Labels

A-attributes Area: Attributes (`#[…]`, `#![…]`) A-run-make Area: port run-make Makefiles to rmake.rs A-rustc-dev-guide Area: rustc-dev-guide A-rustdoc-js Area: Rustdoc's JS front-end A-rustdoc-json Area: Rustdoc JSON backend A-test-infra-minicore Area: `minicore` test auxiliary and `//@ add-minicore` A-thread Area: `std::thread` rollup A PR which is a rollup T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-clippy Relevant to the Clippy team. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library 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. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants