Repository navigation
Rollup of 8 pull requests - #165775
Closed
JonathanBrouwer wants to merge 20 commits into
Closed
Rollup of 8 pull requests#165775JonathanBrouwer wants to merge 20 commits into
JonathanBrouwer wants to merge 20 commits into
Conversation
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
Member
Author
Contributor
This comment has been minimized.
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
This comment has been minimized.
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`)
Contributor
|
💔 Test for ca41e2f failed: CI. Failed job:
|
Contributor
|
PR #158970, which is a member of this rollup, was unapproved. |
Collaborator
|
The job Click to see the possible cause of the failure (guessed by this bot) |
Contributor
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:
x bench library/std#165762 (Fixx bench library/std)--show-coverageCLI flag into--coverage#165754 (rustdoc: Rename--show-coverageCLI flag into--coverage)r? @ghost
Create a similar rollup