Rollup of 8 pull requests#157020
Open
GuillaumeGomez wants to merge 19 commits into
Open
Conversation
…ot have to check layout.is_uninhabited
156229 didn't limit the additional DLL copy to Windows as it was supposed to.
…=Zalathar coverage: Use original HIR info for synthetic by-move coroutine bodies > This is a copy of rust-lang#156952(because my git was acting weird) Synthetic by-move coroutine bodies created for async closures don't have useful HIR of their own. Coverage was falling back to the parent async closure for HIR info, which means the executed `AsyncFnOnce` body could inherit hole spans from the wrong body and report the user-written closure body as uncovered. This PR uses the synthetic body's coroutine type to recover the original coroutine body def-id, then extracts HIR info from that body instead. That keeps the coverage spans tied to the body the synthetic MIR was cloned from. Fixes rust-lang#151135. r? Zalathar
Constify Iterator-related methods and functions These functions are required to eventually constify `Iterator` r? @oli-obk
…=GuillaumeGomez rustdoc: deterministic sorting for `doc_cfg` badges Fixes rust-lang#156391 Currently, target-exclusive `doc_cfg` badges (eg. "Available on...") reuse the order of predicates as they appear in the source code. This often buries popular targets behind niche ones and leads to inconsistent UI rendering. This PR introduces a deterministic sorting mechanism to the `Cfg` AST prior to HTML/JSON rendering. **Note for Reviewers:** To provide the best UX, I implemented a lightweight tiering heuristic (prioritizing major platforms like Linux/Apple/Windows first, followed by mobile, then BSDs, and alphabetizing the rest). However, I am completely open to tweaking these priority groupings or falling back to a different sorting logic if the team prefers. Let me know what you think!
…r=JohnTitor Clarify "infinite size" in cyclic-type diagnostic refers to the type name Closes rust-lang#149842 The `TypeError::CyclicTy` diagnostic currently emits "cyclic type of infinite size". As discussed in the issue, "infinite size" reads as the in-memory `size_of::<T>()` of values, when it actually refers to the textual representation of the type name (an iso-recursive occurs-check failure). This rewords the message so the qualifier "infinite-size" clearly modifies the *name*, matching the direction `@fmease`, `@BoxyUwU`, and the issue author converged on: ``` - cyclic type of infinite size + recursive type with infinite-size name ``` Nine existing UI `.stderr` baselines and two `//~ NOTE` annotations are updated to track the new wording. No semantics change. Tested: - ./x test tests/ui/const-generics/occurs-check/ tests/ui/closures/ tests/ui/unboxed-closures/ tests/ui/typeck/ tests/ui/coroutine/ --force-rerun - ./x test tidy
…nethercote Add uwtable annotation to modules when required When unwind tables are enabled with `-Cforce-unwind-tables=y`, Rust will annotate all functions with the `uwtable` annotation. However, this annotation is missing on modules, which leads to incorrect unwind tables being generated by LLVM for constructors (such as `asan.module_ctor`). This was discovered because it leads to a crash in Linux when KASAN and dynamic shadow call stack are both enabled. In this scenario, the kernel uses the unwind tables to locate the `paciasp` and `autiasp` instructions in each function and patches the machine code at boot to use the shadow call stack instructions instead. However, LLVM's AArch64PointerAuth pass emits DWARF info for `paciasp` whenever `-g` is passed, but only emits DWARF info for `autiasp` when the `uwtable` attribute is present. Since the `uwtable` annotation is missing for modules, the relevant directives are generated for only the `autiasp` instruction in `asan.module_ctor`, and not for the `paciasp` instruction. This causes the kernel's dynamic SCS logic to patch the prolouge of `asan.module_ctor`, but not the epilogue. This leads to a crash as the shadow call stack becomes unbalanced. The fact that LLVM doesn't use the same condition for whether to emit DWARF information for both instructions may be a separate bug in LLVM. Relevant issue: llvm/llvm-project#188234 AI assistance was used to determine the root cause of this crash from the observed symptoms, and to write the tests. Also thanks to @samitolvanen and @maurer for debugging this issue. Similar to this previous PR of mine: rust-lang#130824
…s-only, r=jieyouxu Limit the additional DLL to Windows rust-lang#156229 didn't limit the additional DLL copy to Windows as it was supposed to.
…li-obk interpret/validity: properly treat zero-variant enums so that we do not have to check layout.is_uninhabited I am very happy to finally remove the last of these somewhat ad-hoc checks. :) r? @oli-obk
std: Fix thread::available_parallelism on Redox targets This brings support to `thread::available_parallelism` on Redox targets via `sysconf`. It has been available since `libc 0.2.177` and tested for months. References: - [libc implementation](rust-lang/libc#4728) - [downstream patch](https://gitlab.redox-os.org/redox-os/rust/-/merge_requests/27)
Member
Author
|
@bors r+ p=5 rollup=never |
Contributor
This comment has been minimized.
This comment has been minimized.
rust-bors Bot
pushed a commit
that referenced
this pull request
May 27, 2026
Rollup of 8 pull requests Successful merges: - #156970 (coverage: Use original HIR info for synthetic by-move coroutine bodies) - #156390 (Constify Iterator-related methods and functions) - #156401 (rustdoc: deterministic sorting for `doc_cfg` badges) - #156845 (Clarify "infinite size" in cyclic-type diagnostic refers to the type name) - #156973 (Add uwtable annotation to modules when required) - #156985 (Limit the additional DLL to Windows) - #156988 (interpret/validity: properly treat zero-variant enums so that we do not have to check layout.is_uninhabited) - #157002 (std: Fix thread::available_parallelism on Redox targets)
Contributor
|
💔 Test for 9178026 failed: CI. Failed job:
|
Collaborator
|
The job Click to see the possible cause of the failure (guessed by this bot) |
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:
doc_cfgbadges #156401 (rustdoc: deterministic sorting fordoc_cfgbadges)r? @ghost
Create a similar rollup