Skip to content

Rollup of 8 pull requests - #161031

Open
jhpratt wants to merge 21 commits into
rust-lang:mainfrom
jhpratt:rollup-XTZ644V
Open

Rollup of 8 pull requests#161031
jhpratt wants to merge 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

rust-bors Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

⌛ Testing commit 5a3fcad with merge ba28ff7...

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

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

Successful merges:

 - #159593 (merge ambiguity errors that blame the same inference variable)
 - #160687 (Experiment: Add `core::cmp::smallest` and `core::cmp::largest`)
 - #160856 (Replace infers and non-rigid aliases with `Ty/Const::Error` if param env normalization fails)
 - #160961 (bootstrap: Overhaul matching of command-line selectors to steps)
 - #160975 (Remove target argument from get_proc_macros)
 - #161023 (bootstrap: Replace the `exit!` macro with a function `helpers::exit_process`)
 - #160932 (Make tidy::Version public)
 - #161029 (mailmap: Update my default email)
@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)

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 rollup A PR which is a rollup 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-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.

9 participants