Skip to content

Rollup of 10 pull requests - #162853

Open
Zalathar wants to merge 41 commits into
rust-lang:mainfrom
Zalathar:rollup-7nlu8K9
Open

Zalathar wants to merge 41 commits into
rust-lang:mainfrom
Zalathar:rollup-7nlu8K9

Conversation

@Zalathar

Copy link
Copy Markdown
Member

Successful merges:

r? @ghost

Create a similar rollup

petrochenkov and others added 30 commits August 7, 2026 15:14
It makes sense to put the top-level item first, before the use tree
within the item. And it makes sense to have a single function-level
comment explaining this rather than inline comments at the definition
and every call site.
`is_public` is not relevant here.
changes in later commits need this case out of the way
Originally introduced in the Enzyme build and coppied around since,
but without effect for a few years by now.
Replace the opaque representation of `PassMode::Cast` with a
structured `CastTarget` type that exposes the register layout
used by the platform ABI. Add `Uniform`, `Reg`, and `RegKind`
types so tools can inspect how arguments are mapped to registers.

Add `CastTarget::size()` and `Uniform::reg_count()` helpers.
Add a test covering cast on args, returns, mixed register kinds,
multiple arguments, and register exhaustion causing stack spill.
Expose argument ABI attributes through a structured type instead of
opaque debug strings. ArgAttributes provides accessors for the
extension mode (zero/sign-extend) and pointee alignment, which are
needed by tools doing their own code generation.

This removes all uses of Opaque from the abi module.
BREAKING CHANGE: `ValueAbi` is renamed to `ValueRepr` and the
`LayoutShape::abi` field is renamed to `LayoutShape::value_repr`.

The old name was misleading: this type does not describe how values
are passed in function calls (that is `PassMode`), it is a hint for
how backends should represent values (as scalars, vectors, or
aggregates). This aligns with the internal rename from `Abi` to
`BackendRepr`.

Also fixes several doc comments that incorrectly claimed layout
fields define calling behavior.
For !needs_drop types, this should allow decoding directly into the
arena-allocated slice.

For needs_drop types, the arena already collects into a SmallVec<T>, so this
avoids an intermediate conversion from Vec<T> to SmallVec<T>.
These impls all match the impl provided by the into-arena macro.
The existing `codec` module contains a sea of impls that is hard to navigate.
Extracting the RefDecodable parts into another file should make it easier to
keep track of what is where.

This commit tries to move everything as-is, so that `git diff --color-moved`
can verify that nothing was changed. Subsequent commits will modify the moved
code.
- Added and expanded comments
- Renamed and clarified the impl-decodable macro
- Sorted the macro list of Decodable impls
This commit replaces the existing boilerplate impls and the existing macro with
a less confusing macro.

Some unused impls have been removed.
It's simpler to make the `decode` method generic over `impl TyDecoder`.
Currently a `NodeId` is stored in a pair with each nested use tree. This
commit changes the pair to a named type `UseTreeAndId`. In most places
this doesn't make much difference but in the AST visitor it gets rid of
several weird special cases.
Cleanups related to RefDecodable

- Earlier experiments: rust-lang#162287
---

This PR is a series of cleanups to the RefDecodable trait and its associated impls.

Details in individual commits.

There should be no change to compiler output.

r? nnethercote (or compiler)
…excrichton

wasm: fix ABI for enums with integer layout and ZST fields

fixes rust-lang#121408
follow-up to rust-lang#162806

Clang is doing something that is rather annoying for us to emulate: like with unions it looks at the structure of the type, not the representation. But in rust an `enum` that is represented as an integer is not considered an `aggregate` at all, yet may still need to be passed as one if it has any (even ZST) fields.

r? alexcrichton
cc @hanna-kruppe
…ai410

[rustc_public] Enhance PassMode API

This change is split into two different commits:
1. [Expand PassMode::Cast with CastTarget](rust-lang@5823ef2): This is basically a 1:1 mapping from the internal compiler representation.
2. [Replace Opaque with ArgAttributes in PassMode](rust-lang@7540529): Expose the non-LLVM specific ArgAttributes information. Leave the internal representation private for now in case we do want to expand its implementation later.
…obzol

Offload cmake cleanups

r? kobzol

Split out of rust-lang#161565, which requires (minor) LLVM changes.
These cleanups are valuable on their own already, and shouldn't be blocked. So let's land it, before it get's stale with all the refactoring going on ^^

Copied the disclaimer: I used an llm to implement the fixes, since I still don't like cmake.
I confirm that on a high-level these are the right fixes as far as I can tell, and I reviewed/refactored it.
…enkov

Add regression test for malformed RPITIT bound ICE with the new solver

Fixes rust-lang#156100
@rust-bors rust-bors Bot added the rollup A PR which is a rollup label Sep 16, 2026
@rustbot rustbot added A-CI Area: Our Github Actions CI A-rustc-dev-guide Area: rustc-dev-guide A-testsuite Area: The testsuite used to check the correctness of rustc 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) T-clippy Relevant to the Clippy team. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-infra Relevant to the infrastructure 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-rustfmt Relevant to the rustfmt team, which will review and decide on the PR/issue. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) labels Sep 16, 2026
@Zalathar

Copy link
Copy Markdown
Member Author

Rollup of everything.

@bors r+ rollup=never p=5

@rust-bors

rust-bors Bot commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 6f81ec1 has been approved by Zalathar

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 Sep 16, 2026
@JonathanBrouwer

Copy link
Copy Markdown
Member

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

@rust-bors

This comment has been minimized.

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


try-job: dist-various-1
try-job: test-various
try-job: test-x86_64-gnu-aux
try-job: test-x86_64-gnu-llvm-21-3
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
@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 Sep 16, 2026
@rust-bors

rust-bors Bot commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

💔 Test for a5309a3 failed: CI, CI

@JonathanBrouwer

Copy link
Copy Markdown
Member

???

@rust-bors

rust-bors Bot commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

⌛ Testing commit 6f81ec1 with merge 92801ed...

Workflow: https://github.com/rust-lang/rust/actions/runs/35108417732

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

Successful merges:

 - #156216 (implement const Iterator for Range)
 - #160697 (rustc: Tweak the effect of `--jobs` on frontend parallelism)
 - #162748 (Enable LLVM Thin LTO for LoongArch64)
 - #162769 (Yeet the `DeepRegionResolver` (earlier called `OpportunisticRegionResolver`))
 - #162794 (Simplify `ast::UseTreeKind`)
 - #162800 (Cleanups related to RefDecodable)
 - #162826 (wasm: fix ABI for enums with integer layout and ZST fields)
 - #159359 ([rustc_public] Enhance PassMode API)
 - #162196 (Offload cmake cleanups)
 - #162818 (Add regression test for malformed RPITIT bound ICE with the new solver)
@rust-log-analyzer

Copy link
Copy Markdown
Collaborator

The job test-x86_64-gnu-next-trait-solver-polonius failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
test [ui] tests/ui/test-attrs/tests-listing-format-json.rs ... ok
test [ui] tests/ui/thir-print/thir-flat-const-variant.rs ... ok
test [ui] tests/ui/test-attrs/tests-listing-format-terse.rs ... ok

Session terminated, killing shell...::group::Clock drift check
  local time: test [ui] tests/ui/thir-print/thir-tree-array-index.rs ... ok
##[error]The runner has received a shutdown signal. This can happen when the runner service is stopped, or a manually started runner is canceled.
Wed Sep 16 14:32:43 UTC 2026
  network time: test [ui] tests/ui/thir-print/thir-flat.rs ... ok
test [ui] tests/ui/thir-print/thir-tree-field-expr-index.rs ... ok

Important

For more information how to resolve CI failures of this job, visit this link.

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

Labels

A-CI Area: Our Github Actions CI A-rustc-dev-guide Area: rustc-dev-guide A-testsuite Area: The testsuite used to check the correctness of rustc 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. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. 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-infra Relevant to the infrastructure 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-rustfmt Relevant to the rustfmt team, which will review and decide on the PR/issue. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver)

Projects

None yet

Development

Successfully merging this pull request may close these issues.