Skip to content

Rollup of 4 pull requests - #162081

Closed
JonathanBrouwer wants to merge 14 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-BdVSVkR
Closed

Rollup of 4 pull requests#162081
JonathanBrouwer wants to merge 14 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-BdVSVkR

Conversation

@JonathanBrouwer

Copy link
Copy Markdown
Member

Successful merges:

r? @ghost

Create a similar rollup

Zalathar and others added 14 commits August 5, 2026 20:41
For dist-aarch64-linux (full):

* GHA 8c takes 2h25m ($2.03/build)
* c8g.8xl takes 1h20m ($1.69/build)
* c9g.8xl takes 1h ($1.38/build)
* c9g.4xl takes 1h10m ($0.81/build)
* m9g.2xl takes 1h30m ($0.59/build) - selected

And adds a dist-aarch64-linux-quick:

* c8g.8xl takes 50m ($1.059/build)
* c9g.8xl takes 40m ($0.924/build)
* c9g.4xl takes 47m ($0.543/build) - selected
* m9g.2xl takes 64m ($0.417/build)

For now I've chosen a balance between cost and speed (c9g.4xl). Once we
decide where to enable this (e.g., in try builds by default) we can
consider aligning with other tasks and saving $/build if we're not able
to benefit from increased speed (e.g., because perf won't run until the
try build as a whole finishes).

For dist-x86_64-linux-full we have this breakdown:

* c8a.8xl takes 1h34m ($2.64/build) - current
* c8a.4xl takes 1h45m ($1.51/build) - selected
* m8a.2xl takes 2h10m ($1.05/build)

I'll re-benchmark dist-x86_64-linux-quick in a future PR, for now it
will stay on c8a.8xl. This drops codebuild configuration (but not yet
cleaning up various related pieces that are more tied into our CI) since
it doesn't seem relevant anymore.
rustdoc: add `--print` option

Context: `--print crate-root-lint-levels` (rust-lang#139180) is only available for `rustc` and `clippy-driver`, while it would make sense for it to also be available for `rustdoc` (à la rust-lang#83895.)

Not too sure about the stability of `rustdoc --print=any` or if this needs a MCP; strictly speaking, only `rustdoc +nightly -Z unstable-options --print=crate-root-lint-levels` would be required (and the `rustdoc --print` would be stabilized together with `crate-root-lint-levels`), but I guess that makes sense to have all the `--print`s for consistency.

For regression tests, not sure if ui or run-make is preferable, as run-make would need some sort of trait to avoid duplicating code between `rustc()` and `rustdoc()` (or just test `rustdoc` as it delegates to `rustc`):
https://github.com/rust-lang/rust/blob/021fc25b7a48f6051bee1e1f06c7a277e4de1cc9/tests/run-make/print-crate-root-lint-levels/rmake.rs#L82-L88

@rustbot label +A-CLI +A-print-requests
mir_build: Clearly distinguish or/refutable/irrefutable patterns during match lowering

This PR has two related parts.

- The first commit divides the various fields of InterPat into three different `InterPatKind` variants, which clearly distinguish between or-pattern nodes, refutable pattern nodes, and irrefutable pattern nodes. Such a split was suggested during review of rust-lang#155144, but at the time I wasn't sure if it was the right direction. Now that I've thought more about how to make it work nicely with InterPat node building, I'm more comfortable with the explicit split.

- As a follow-on, the second commit then splits MatchPairTree into two different `MatchPairKind` variants: one for or-pattern nodes, and one for “testable” nodes.

In both cases, dividing the outer struct into multiple kinds makes it easier to understand and uphold field invariants, since previously-optional fields can be made mandatory or absent.

There should be no change to compiler output.

---
- The changes to MatchPairTree can be seen as an alternative to rust-lang#158551. Instead of splitting or-patterns and testable-patterns into separate lists, they still occupy the same list but are distinguished by kind.

---

r? Nadrieril
…-args, r=BoxyUwU

explicitly track inherent const generic args kind

in doing so, and as an exercise of this new code, implement regular (non-type-const) inherent consts in the type system under `feature(generic_const_args)`

see the new big doc comment in `compiler/rustc_type_ir/src/const_kind.rs` if you dunno what the heck I'm on about with "self args" vs "impl args" ✨

on a small note, the FIXME on `alias_term_kind_from_def_id` becomes even more relevant with this PR, `ty::AliasConstInherentArgsKind` is kinda gross tbh. explicitly not refactoring that in this PR though, to keep scope/the diff manageable.

also, `check_args_compatible` is very spooky scary in that if you have a `ty::Alias`, you ought to use `check_term_args_compatible`, but nothing's stopping you from calling `check_args_compatible` with the term's DefId. I was unable to think up a clever API that would prevent this misuse.

and finally, I think some of these match statements could theoretically `bug!` on one form or the other of InherentSelf/InherentImpl, but for now I'm intentionally being a bit conservative here, we can tighten up later.

---

relevant tracking issue: rust-lang/project-const-generics#98

also very related to `feature(inherent_associated_types)`: rust-lang#8995 rust-lang/project-const-generics#71

relevant PR that intentionally failed to implement inherent consts in the type system due to not tracking this: rust-lang#155341

implementing support for a trait with a regular const being refined with an impl that has a directly represented RHS is extremely annoying and difficult without this, the lack of support of which causes rust-lang#161264 (was working on adding support when I got sidetracked with this PR), see also this zulip thread: [#project-const-generics > implementing assoc consts as direct args](https://rust-lang.zulipchat.com/#narrow/channel/260443-project-const-generics/topic/implementing.20assoc.20consts.20as.20direct.20args/with/618953051) (is there an issue for this?)

r? @BoxyUwU
Switch dist-aarch64-linux to EC2 and update dist-x86_64-linux

For dist-aarch64-linux (full):

* GHA 8c takes 2h25m ($2.03/build) - current
* c8g.8xl takes 1h20m ($1.69/build)
* c9g.8xl takes 1h ($1.38/build)
* c9g.4xl takes 1h10m ($0.81/build)
* m9g.2xl takes 1h30m ($0.59/build) - selected

Adds a dist-aarch64-linux-quick (default enabled in try builds):

* c8g.8xl takes 50m ($1.059/build)
* c9g.8xl takes 40m ($0.924/build)
* c9g.4xl takes 47m ($0.543/build) - selected
* m9g.2xl takes 64m ($0.417/build)

For now I've chosen a balance between cost and speed (c9g.4xl). This is still faster than the x86 build so shouldn't slow us down.

For dist-x86_64-linux-full this reduces core count to be a bit more cost efficient:

* c8a.8xl takes 1h34m ($2.64/build) - current
* c8a.4xl takes 1h45m ($1.51/build) - selected
* m8a.2xl takes 2h10m ($1.05/build)

I'll re-benchmark dist-x86_64-linux-quick in a future PR, for now it will stay on c8a.8xl. This PR also drops codebuild configuration (but not yet cleaning up various related pieces that are more tied into our CI) since it doesn't seem relevant anymore.

Testing:

* Regular try (no jobs selected) - https://github.com/rust-lang/rust/actions/runs/33395505441
  * Runs both x86 and aarch64, both in quick variants
* Try with jobs=dist-x86_64-linux*,dist-aarch64-linux* - https://github.com/rust-lang/rust/actions/runs/33394676009
  * Runs both x86 and aarch64, quick and non-quick
  * This fixes a bug where dist-x86_64-linux-quick via explicit request used to not be a quick job AFAICT; nothing set DIST_TRY_BUILD on it.

r? @Kobzol
@rust-bors rust-bors Bot added the rollup A PR which is a rollup label Aug 31, 2026
@rustbot rustbot added A-CI Area: Our Github Actions CI A-run-make Area: port run-make Makefiles to rmake.rs A-testsuite Area: The testsuite used to check the correctness of rustc PG-exploit-mitigations Project group: Exploit mitigations 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-infra Relevant to the infrastructure 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. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) labels Aug 31, 2026
@JonathanBrouwer

Copy link
Copy Markdown
Member Author

@bors r+ p=5

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

@rust-bors

rust-bors Bot commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 9b58942 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 Aug 31, 2026
@rust-bors

This comment has been minimized.

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


try-job: dist-various-1
try-job: test-various
try-job: x86_64-gnu-aux
try-job: x86_64-gnu-llvm-21-3
try-job: x86_64-msvc-1
try-job: aarch64-apple-1
try-job: aarch64-apple-2
try-job: x86_64-mingw-1
try-job: i686-msvc-1
try-job: i686-msvc-2
@rust-log-analyzer

Copy link
Copy Markdown
Collaborator

A job 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 added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Aug 31, 2026
@rust-bors

rust-bors Bot commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

PR #151618, which is a member of this rollup, was unapproved.

This rollup was thus unapproved.

@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 Aug 31, 2026
@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 Aug 31, 2026
@rust-bors

rust-bors Bot commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

💔 Test for 6338885 failed: CI. Failed jobs:

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-run-make Area: port run-make Makefiles to rmake.rs A-testsuite Area: The testsuite used to check the correctness of rustc PG-exploit-mitigations Project group: Exploit mitigations 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-infra Relevant to the infrastructure 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. 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.

7 participants