Skip to content

Rollup of 8 pull requests - #161031

Merged
rust-bors[bot] merged 21 commits into
rust-lang:mainfrom
jhpratt:rollup-XTZ644V
Aug 13, 2026
Merged

Rollup of 8 pull requests#161031
rust-bors[bot] merged 21 commits into
rust-lang:mainfrom
jhpratt:rollup-XTZ644V

Conversation

@jhpratt

@jhpratt jhpratt commented Aug 13, 2026

Copy link
Copy Markdown
Member

Successful merges:

r? @ghost

Create a similar rollup

Kat-zorn and others added 21 commits August 11, 2026 19:30
multiple `FulfillmentErrorCode::Ambiguity` obligations on the same
inference variable only ever reported the first — the rest got dropped
after `set_tainted_by_errors` fired. grouped them by sub-unification-table
root and fold Trait/Projection predicates from the group into notes on the
primary. uses the sub root not the raw TyVid so variables unified by a
pending Coerce obligation correctly land in the same group.

fixes rust-lang#103911
Currently it will always load proc-macros for the host. In the future it
may also start loading wasm proc-macros. This way rust-analyzer doesn't
have to pick between both options itself.
an error pointing at a different expression labels that expression and suggests how to annotate
it, and a note on the merged diagnostic carries none of that, so it kept getting dropped. such
errors are reported on their own again, and the bounds behind the errors that do get merged are
now explained on the merged diagnostic.
Variadic alternatives to `min` and `max` using `splat`.
The function can check `cfg!(test)` internally, without needing any macro
magic. This lets us remove a crate-root definition and a `#[macro_export]`.
…, r=khyperia

merge ambiguity errors that blame the same inference variable

multiple `FulfillmentErrorCode::Ambiguity` obligations on the same inference variable only ever reported the first. the rest got dropped after `set_tainted_by_errors` fired. grouped them by sub-unification-table root and fold Trait/Projection predicates from the group into notes on the primary. uses the sub root not the raw TyVid so variables unified by a pending Coerce obligation correctly land in the same group.

fixes rust-lang#103911

r? @lcnr
…_max, r=nia-e

Experiment: Add `core::cmp::smallest` and `core::cmp::largest`

Tracking Issue: rust-lang#160728
Zulip: [#t-libs-api/api-changes > variadic min/max](https://rust-lang.zulipchat.com/#narrow/channel/327149-t-libs-api.2Fapi-changes/topic/variadic.20min.2Fmax/with/570428142)

# Description

Adds variadic alternatives to `cmp::min` and `cmp::max` which use `#[rustc_splat]` to allow anywhere from 1 to 12 arguments to be compared. Twelve chosen as an arbitrary limit. This doesn't have a pre-existing ACP or tracking issue (linking the `splat` issue since it's the most relevant), so I've added these two functions, `smallest` and `largest` under a new feature, `cmp_splat`.

This mostly exists to demonstrate a possible solution to the problem posited in the linked Zulip thread. Happy to close if undesirable, as my current focus is on `no_std` I/O.
…h-err, r=lcnr

Replace infers and non-rigid aliases with `Ty/Const::Error` if param env normalization fails

Fixes rust-lang#160196
Fixes rust-lang#148630

Previously we use unnormalized param env if we fail to normalize it. This causes problem for places which expect normalized param env, like in lexical region solving.

I also sneak in a one-line change that we resolve regions with normalized param env in param env normalization now.
This fixes ICEs in `polkadot` and `zerocopy` which had non-rigid const aliases in type outlive env before. I can split it into another PR if that's preferred.

r? lcnr
bootstrap: Overhaul matching of command-line selectors to steps

The existing bootstrap code for matching command-line selectors (paths) to steps has to jump through hoops to reconstruct the relative order of command-line arguments, and to keep track of which selectors didn't end up matching any steps. It also makes an awkward distinction between test-suite paths and other kinds of path/alias.

We can simplify the matching process by iterating over the command-line selectors in an outer loop, and retaining that ordering in the resulting collection of work items as much as possible.

Specifically, we keep an ordered list of steps to run, and an ordered list of selected anchors to pass to each step. After deduplicating those lists, the resulting run order is mostly consistent with command-line order, while batching each step's work as much as possible.

---

This new implementation should give *mostly* the same outcomes as the previous implementation, with a few known differences:
- The order of selected anchors passed to each step is *more* consistent with command-line order in some cases (e.g. see the core+alloc+stdarch snapshot test).
- Test-suite paths are no longer processed in a separate earlier pass, so invocations like `./x test compiler ui` will now run the compiler-crate unit tests before the UI tests.
- If multiple test paths are passed for the same test suite, snapshot tests no longer see multiple invocations of the underlying test step. (Step-caching would already prevent the duplicate invocations from actually running.)

---

There are further tweaks or enhancements that could be made, but I decided to stop here to stick to preserve existing behaviour as much as possible, outside of the differences that naturally fall out of the simpler implementation.
…rk-Simulacrum

Remove target argument from get_proc_macros

Currently it will always load proc-macros for the host. In the future it may also start loading wasm proc-macros. This way rust-analyzer doesn't have to pick between both options itself.

Part of rust-lang#160389
…clubby789

bootstrap: Replace the `exit!` macro with a function `helpers::exit_process`

The function can check `cfg!(test)` internally, without needing any macro magic. This lets us remove a crate-root definition and a `#[macro_export]`.
Make tidy::Version public

The tidy library in `src/tools/tidy` is used to implement the `tidy` tool, but is also used by other in-tree crates like `feature-status-dump` to analyze which features are defined in the project. This PR makes the `Version` struct public. This has the effect of being able to construct a version using `Version::from_str("1.80.0").unwrap()`. This can then be used to compare (via the already implemented PartialEq trait) the version where a feature was introduced against a user-provided value, rather than only against other features' versions.

I would like this change because I am working on a tool to filter features for several metrics (stability, first version, activity of tracking issue, etc) to help find abandoned features that need someone to push to stabilize them.

This is my first PR here. I hope it is welcome.
@rust-bors rust-bors Bot added the rollup A PR which is a rollup label Aug 13, 2026
@rustbot rustbot added A-meta Area: Issues & PRs about the rust-lang/rust repository itself A-testsuite Area: The testsuite used to check the correctness of rustc A-tidy Area: The tidy tool 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-compiler Relevant to the compiler 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-rust-analyzer Relevant to the rust-analyzer team, which will review and decide on the PR/issue. labels Aug 13, 2026
@rustbot rustbot added 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 13, 2026
@jhpratt

jhpratt commented Aug 13, 2026

Copy link
Copy Markdown
Member Author

@bors r+ p=5

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

@rust-bors

rust-bors Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 5a3fcad has been approved by jhpratt

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

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Aug 13, 2026
Rollup of 8 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-*
try-job: x86_64-mingw-1
try-job: i686-msvc-*
@rust-bors

This comment has been minimized.

@rust-bors

rust-bors Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: 0bb77ff (0bb77ffee70fc22e94c0734af9cb601557775eac)
Base parent: 79ef636 (79ef636a60b0f5ca061b09122bbbca3c7b4a3b70)

@rust-bors rust-bors Bot added merged-by-bors This PR was explicitly merged by bors. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Aug 13, 2026
@rust-bors

rust-bors Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

☀️ Test successful - CI
Approved by: jhpratt
Duration: 3h 15m 26s
Pushing ba28ff7 to main...

@rust-bors
rust-bors Bot merged commit ba28ff7 into rust-lang:main Aug 13, 2026
15 checks passed
@rustbot rustbot added this to the 1.99.0 milestone Aug 13, 2026
@rust-timer

Copy link
Copy Markdown
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#159593 merge ambiguity errors that blame the same inference variab… f1505fb38f657fa61f1aef835a6d5fe94ab9f81b (link)
#160687 Experiment: Add core::cmp::smallest and `core::cmp::large… ed1048264bf27cbff5056e7b533435758ace51cc (link)
#160856 Replace infers and non-rigid aliases with Ty/Const::Error f2387d14883fb553041b624210e5b0e6cfe3f528 (link)
#160961 bootstrap: Overhaul matching of command-line selectors to s… 57a3318f3706b32a68aae0450d097f76259bf0d2 (link)
#160975 Remove target argument from get_proc_macros 75757ea313169e88d4039ee339399b8d74131857 (link)
#161023 bootstrap: Replace the exit! macro with a function `helpe… d094cc83fefd0ded46d467683190d88535f451ed (link)
#160932 Make tidy::Version public cc6fcdadaf44a0b85d9536cc4314bdcade24eb20 (link)
#161029 mailmap: Update my default email 0b609888cddcd8e059e8252233ed90eb11e7aa3f (link)

previous master: 1e5ee35637

In the case of a perf regression, run the following command for each PR you suspect might be the cause: @rust-timer build $SHA

@github-actions

Copy link
Copy Markdown
Contributor
What is this? This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.

Comparing 1e5ee35 (parent) -> ba28ff7 (this PR)

Test differences

Show 31 test diffs

Stage 0

  • core::builder::cli_paths::tests::x_test_tests_coverage_trivial_rs: [missing] -> pass (J0)
  • core::builder::cli_paths::tests::x_test_tests_coverage_trivial_rs_and_attr_impl_rs: [missing] -> pass (J0)

Stage 1

  • [ui] tests/ui/inference/ambiguity-errors-single-diagnostic.rs: [missing] -> pass (J2)
  • [ui] tests/ui/traits/next-solver/const-alias-in-outlive-clause.rs: [missing] -> pass (J2)
  • [ui] tests/ui/traits/next-solver/param-env-normalization-fallback.rs#next: [missing] -> pass (J2)
  • [ui] tests/ui/traits/next-solver/param-env-normalization-fallback.rs#old: [missing] -> pass (J2)
  • [ui] tests/ui/wf/closure-trait-ice-in-wfcheck-diagnostics.rs: [missing] -> pass (J2)
  • [crashes] tests/crashes/148630.rs: pass -> [missing] (J3)
  • [ui (polonius)] tests/ui/inference/ambiguity-errors-single-diagnostic.rs: [missing] -> pass (J4)
  • [ui (polonius)] tests/ui/traits/next-solver/const-alias-in-outlive-clause.rs: [missing] -> pass (J4)
  • [ui (polonius)] tests/ui/traits/next-solver/param-env-normalization-fallback.rs#next: [missing] -> pass (J4)
  • [ui (polonius)] tests/ui/traits/next-solver/param-env-normalization-fallback.rs#old: [missing] -> pass (J4)
  • [ui (polonius)] tests/ui/wf/closure-trait-ice-in-wfcheck-diagnostics.rs: [missing] -> pass (J4)

Stage 2

  • [ui] tests/ui/inference/ambiguity-errors-single-diagnostic.rs: [missing] -> pass (J1)
  • [ui] tests/ui/traits/next-solver/const-alias-in-outlive-clause.rs: [missing] -> pass (J1)
  • [ui] tests/ui/traits/next-solver/param-env-normalization-fallback.rs#next: [missing] -> pass (J1)
  • [ui] tests/ui/traits/next-solver/param-env-normalization-fallback.rs#old: [missing] -> pass (J1)
  • [ui] tests/ui/wf/closure-trait-ice-in-wfcheck-diagnostics.rs: [missing] -> pass (J1)
  • [crashes] tests/crashes/148630.rs: pass -> [missing] (J5)

Additionally, 12 doctest diffs were found. These are ignored, as they are noisy.

Job group index

Test dashboard

Run

cargo run --manifest-path src/ci/citool/Cargo.toml -- \
    test-dashboard ba28ff76f353a722f31c4f3dd2ac4e437d36411b --output-dir test-dashboard

And then open test-dashboard/index.html in your browser to see an overview of all executed tests.

Job duration changes

  1. x86_64-gnu-llvm-21-2: 1h -> 1h 37m (+62.8%)
  2. dist-powerpc64-linux-musl: 1h 6m -> 1h 35m (+44.2%)
  3. x86_64-rust-for-linux: 49m 33s -> 29m 49s (-39.8%)
  4. armhf-gnu: 1h 33m -> 59m 28s (-36.1%)
  5. x86_64-gnu-llvm-22-1: 57m 30s -> 1h 17m (+34.3%)
  6. dist-x86_64-illumos: 1h 24m -> 1h 48m (+28.8%)
  7. x86_64-gnu: 1h 57m -> 2h 30m (+27.6%)
  8. i686-gnu-nopt-2: 2h 20m -> 1h 42m (-27.3%)
  9. x86_64-gnu-llvm-21: 54m 27s -> 40m 54s (-24.9%)
  10. i686-gnu-nopt-1: 1h 42m -> 1h 18m (-23.2%)
How to interpret the job duration changes?

Job durations can vary a lot, based on the actual runner instance
that executed the job, system noise, invalidated caches, etc. The table above is provided
mostly for t-infra members, for simpler debugging of potential CI slow-downs.

@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (ba28ff7): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This perf run didn't have relevant results for this metric.

Max RSS (memory usage)

Results (primary -6.5%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-6.5% [-6.7%, -6.3%] 2
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -6.5% [-6.7%, -6.3%] 2

Cycles

Results (primary 0.1%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
2.4% [2.4%, 2.4%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-2.1% [-2.1%, -2.1%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.1% [-2.1%, 2.4%] 2

Binary size

This perf run didn't have relevant results for this metric.

Bootstrap: 457.516s -> 457.997s (0.11%)
Artifact size: 396.41 MiB -> 396.43 MiB (0.00%)

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

Labels

A-meta Area: Issues & PRs about the rust-lang/rust repository itself A-testsuite Area: The testsuite used to check the correctness of rustc A-tidy Area: The tidy tool merged-by-bors This PR was explicitly merged by bors. rollup A PR which is a rollup T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler 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-rust-analyzer Relevant to the rust-analyzer 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.

10 participants