Skip to content

Rollup of 4 pull requests#157061

Closed
GuillaumeGomez wants to merge 10 commits into
rust-lang:mainfrom
GuillaumeGomez:rollup-7efZDjM
Closed

Rollup of 4 pull requests#157061
GuillaumeGomez wants to merge 10 commits into
rust-lang:mainfrom
GuillaumeGomez:rollup-7efZDjM

Conversation

@GuillaumeGomez
Copy link
Copy Markdown
Member

Successful merges:

r? @ghost

Create a similar rollup

onehr and others added 10 commits May 27, 2026 18:16
…=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!
cg_llvm: Use `LLVMDIBuilderCreateEnumeratorOfArbitraryPrecision`

- Part of rust-lang#134001
- Follow-up to rust-lang#146763
---

This PR replaces our custom `LLVMRustDIBuilderCreateEnumerator` FFI binding with an equivalent LLVM-C binding to `LLVMDIBuilderCreateEnumeratorOfArbitraryPrecision`, which was introduced in LLVM 21.

I have also added comments to the remaining `LLVMRustDIBuilder` functions explaining why they currently can't use an LLVM-C binding, and noted some other functions that can use LLVM-C bindings in the future.
…suggestion-144319, r=jieyouxu

Suggest function-local constructors without enclosing function path

Closes rust-lang#144319

This fixes a mismatched-type wrapper suggestion for constructors defined inside
function-like scopes. The previous diagnostic used `def_path_str` directly, so a
function-local tuple struct could be suggested as `main::Foo(false)`, even though
`main` is not a module path that can name the constructor.

The suggestion now prints the constructor path under rustc's existing suggestion
printer mode. That mode omits path segments that cannot be written in source,
while preserving real path segments such as local modules and enum names.

The regression test covers:

- a function-local tuple struct constructor
- a function-local enum variant
- a tuple struct inside a function-local module
- a tuple struct inside a closure body
- a tuple struct inside an inline const block
Fix missing note of escaping `{` for braces including whitespaces

Fixes rust-lang#156868

Add note of escaping `{` for braces including whitespaces
@rust-bors rust-bors Bot added the rollup A PR which is a rollup label May 28, 2026
@rustbot rustbot added A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. 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. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output. labels May 28, 2026
@GuillaumeGomez
Copy link
Copy Markdown
Member Author

@bors r+ rollup=never p=5

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented May 28, 2026

📌 Commit bae1743 has been approved by GuillaumeGomez

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 May 28, 2026
@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request May 28, 2026
Rollup of 4 pull requests

Successful merges:

 - #156401 (rustdoc: deterministic sorting for `doc_cfg` badges)
 - #156746 (cg_llvm: Use `LLVMDIBuilderCreateEnumeratorOfArbitraryPrecision`)
 - #156889 (Suggest function-local constructors without enclosing function path)
 - #157012 (Fix missing note of escaping `{` for braces including whitespaces)
@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 May 28, 2026
@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented May 28, 2026

💔 Test for 6b9bc8c failed: CI. Failed job:

@JonathanBrouwer
Copy link
Copy Markdown
Contributor

Spurious. Closing in favour of bigger rollup

@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 May 28, 2026
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label May 28, 2026
@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented May 28, 2026

This pull request was unapproved due to being closed.

@GuillaumeGomez GuillaumeGomez deleted the rollup-7efZDjM branch May 28, 2026 13:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. rollup A PR which is a rollup S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. 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. 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.

7 participants