Skip to content

Rollup of 10 pull requests#155674

Merged
rust-bors[bot] merged 27 commits intorust-lang:mainfrom
JonathanBrouwer:rollup-NG1fnzG
Apr 23, 2026
Merged

Rollup of 10 pull requests#155674
rust-bors[bot] merged 27 commits intorust-lang:mainfrom
JonathanBrouwer:rollup-NG1fnzG

Conversation

@JonathanBrouwer
Copy link
Copy Markdown
Contributor

Successful merges:

r? @ghost

Create a similar rollup

dianqk and others added 27 commits January 23, 2026 18:36
Skipping FileCheck in codegen/assembly tests is normally not very useful, but a
small number of existing tests were using `//@ build-pass` to do so anyway, so
it's clearer for them to explicitly use `//@ skip-filecheck` instead.
Tests in `tests/mir-opt` always use `--emit=mir`, so the compiler doesn't even
produce an executable.

Attempting to "run" these tests (e.g. with `./x test mir-opt --pass=run`)
therefore fails when the OS notices that a MIR text file is not executable.
This argument is only used to inhibit `#![allow(unused)]` for `//@ run-pass` UI
tests.

No callers actually need to override this value, even when doing unusual
things, so we can just look it up inside the method body instead.
LLVM 23 removed Os and Oz optimization pipelines and the PR says to use
O2 with optsize or minsize instead as appropriate.
mir-opt: Remove the workaround in UnreachableEnumBranching

rust-lang#120268 added a workaround due to the compile time of TailDuplicator.

LLVM 20 has resolved this in llvm/llvm-project#114990 and llvm/llvm-project#132536.
…t-iat-ice, r=jackh726

Fix ICE for inherent associated type mismatches

Avoid projection-only suggestions for inherent associated types.

Closes rust-lang#154333
Closes rust-lang#155204
…tgross35

Improved assumptions relating to isqrt

Improved various assumptions relating to values yielded by `isqrt`.
Does not solve but does improve rust-lang#132763.

Re-openeing of rust-lang#154115

Added assumptions are:
* if `x` is nonzero then `x.isqrt()`  is nonzero
* `x.isqrt() <= x`
* `x.isqrt() * x.isqrt() <= x`
c-variadic: use `emit_ptr_va_arg` for  mips

tracking issue: rust-lang#44930

After reading the implementation carefully, I believe it really is just `emit_ptr_va_arg`.

The LLVM implementation can be found here: https://github.com/llvm/llvm-project/blob/289a3292be0c6a3df86bcdf5be7dd05b79a5570c/llvm/lib/Target/Mips/MipsISelLowering.cpp#L2338.

r? workingjubilee
…d-code, r=wesleywiser

Mark a function only used in nightly as nightly only

If you run `./x.py test rustc_next_trait_solver` you'll currently see a failure:

```
warning: method `merge` is never used
  --> compiler/rustc_abi/src/callconv.rs:38:8
   |
25 | impl HomogeneousAggregate {
   | ------------------------- method in this implementation
...
38 |     fn merge(self, other: HomogeneousAggregate) -> Result<HomogeneousAggregate, Heterogeneous> {
   |        ^^^^^
   |
   = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default

warning: `rustc_abi` (lib) generated 1 warning
```

This is because the usages are behind a nightly feature flag:

https://github.com/rust-lang/rust/blob/fda6d37bb88ee12fd50fa54d15859f1f91b74f55/compiler/rustc_abi/src/callconv.rs#L52

https://github.com/rust-lang/rust/blob/fda6d37bb88ee12fd50fa54d15859f1f91b74f55/compiler/rustc_abi/src/callconv.rs#L131

https://github.com/rust-lang/rust/blob/fda6d37bb88ee12fd50fa54d15859f1f91b74f55/compiler/rustc_abi/src/callconv.rs#L167

This does the flag off.

Test on `main` and this branch:

```
./x.py test rustc_next_trait_solver
```
Make `//@ skip-filecheck` a normal compiletest directive

The `skip-filecheck` directive is currently used by mir-opt tests, to suppress the default behaviour of running LLVM's `FileCheck` tool to check MIR output against FileCheck rules in the test file.

The `skip-filecheck` directive was not included in the big migration to `//@` directive syntax (rust-lang#121370), perhaps because it was parsed and processed in the *miropt-test-tools* helper crate, not in compiletest itself.

Recently I noticed that a small number of *codegen-llvm* tests were using the `//@ build-pass` directive, which has the non-obvious effect of skipping FileCheck in codegen tests. That's quite confusing, so I decided to have the mir-opt tests migrate over to a proper `//@ skip-filecheck` directive, which could then be used by codegen tests as well.

(I also added skip-filecheck support to assembly tests, which are very similar to codegen tests, though there are currently no assembly tests that actually use `//@ skip-filecheck`.)

---

Support for using `//@ build-pass` in codegen tests to skip FileCheck was introduced in rust-lang#113603. With hindsight, I think doing things that way was pretty clearly a  mistake, and we'll be better off with `//@ skip-filecheck`.

r? jieyouxu
Remove non-working code for "running" mir-opt tests

Tests in `tests/mir-opt` always use `--emit=mir`, so the compiler doesn't even produce an executable.

Attempting to "run" these tests (e.g. with `./x test mir-opt --pass=run`) therefore fails when the OS notices that a MIR text file is not executable.

---

The second commit performs some semi-related cleanup.

r? jieyouxu
Expand `Path::is_empty` docs

Give some reasons why you might want to check if a path is empty. The `Path::join` behaviour can be surprising if you're not aware it might happen.
…nikic

rustc_llvm: update opt-level handling for LLVM 23

LLVM 23 removed Os and Oz optimization pipelines and the PR says to use O2 with optsize or minsize instead as appropriate.

See llvm/llvm-project#191363 for more details.
@rust-bors rust-bors Bot added the rollup A PR which is a rollup label Apr 23, 2026
@rustbot rustbot added A-compiletest Area: The compiletest test runner A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. labels Apr 23, 2026
@rustbot rustbot added A-rustc-dev-guide Area: rustc-dev-guide A-testsuite Area: The testsuite used to check the correctness of rustc F-explicit_tail_calls `#![feature(explicit_tail_calls)]` PG-exploit-mitigations Project group: Exploit mitigations 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. labels Apr 23, 2026
@JonathanBrouwer
Copy link
Copy Markdown
Contributor Author

@bors r+ rollup=never p=5

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented Apr 23, 2026

📌 Commit 0fa807c 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 Apr 23, 2026
@rust-bors

This comment has been minimized.

@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 Apr 23, 2026
@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented Apr 23, 2026

☀️ Test successful - CI
Approved by: JonathanBrouwer
Duration: 3h 53m 16s
Pushing 827651f to main...

@rust-bors rust-bors Bot merged commit 827651f into rust-lang:main Apr 23, 2026
12 checks passed
@rustbot rustbot added this to the 1.97.0 milestone Apr 23, 2026
@rust-timer
Copy link
Copy Markdown
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#146544 mir-opt: Remove the workaround in UnreachableEnumBranching e534529decc9b1922379a7eee37af6dec5deb08d (link)
#152576 c-variadic: use emit_ptr_va_arg for mips cf9293c4f41ec5d78972a58ac5ac279804dfb913 (link)
#154481 Mark a function only used in nightly as nightly only 85f02a76719fbafec1576f0f65e5fc6aec3eb6c1 (link)
#154819 Fix ICE for inherent associated type mismatches 00b26a1022684ec9544f639e860dbdf3060ed3e4 (link)
#155265 Improved assumptions relating to isqrt c76769ba94f2c56cc30f2e94f1b38350d1394d3a (link)
#155614 c-variadic: rename VaList::arg to VaList::next_arg 29fdcf0d8424550ed2d201a2c8b59bf7db382d68 (link)
#155630 Make //@ skip-filecheck a normal compiletest directive 3eadb0360d0035c575e37c534227b8c957a500eb (link)
#155641 Remove non-working code for "running" mir-opt tests 47a1a663dc8bddb5c213a9ab6c3cb738b701f1bc (link)
#155652 Expand Path::is_empty docs 3ce94b830f1341c6f7cbead61278bd60647c53b2 (link)
#155656 rustc_llvm: update opt-level handling for LLVM 23 c2915d86904373e2cbe785f19da320ba35e72e8a (link)

previous master: 92c7010294

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 92c7010 (parent) -> 827651f (this PR)

Test differences

Show 2508 test diffs

Stage 1

  • [assembly] tests/assembly-llvm/c-variadic-mips.rs#MIPS: [missing] -> pass (J1)
  • [assembly] tests/assembly-llvm/c-variadic-mips.rs#MIPS64: [missing] -> pass (J1)
  • [assembly] tests/assembly-llvm/c-variadic-mips.rs#MIPS64EL: [missing] -> pass (J1)
  • [ui] tests/ui/associated-inherent-types/next-solver-opaque-inherent-fn-ptr-issue-155204.rs: [missing] -> pass (J1)
  • [ui] tests/ui/associated-inherent-types/next-solver-opaque-inherent-no-ice.rs: [missing] -> pass (J1)

Stage 2

  • [assembly] tests/assembly-llvm/c-variadic-mips.rs#MIPS: [missing] -> pass (J0)
  • [assembly] tests/assembly-llvm/c-variadic-mips.rs#MIPS64: [missing] -> pass (J0)
  • [assembly] tests/assembly-llvm/c-variadic-mips.rs#MIPS64EL: [missing] -> pass (J0)
  • [ui] tests/ui/associated-inherent-types/next-solver-opaque-inherent-fn-ptr-issue-155204.rs: [missing] -> pass (J2)
  • [ui] tests/ui/associated-inherent-types/next-solver-opaque-inherent-no-ice.rs: [missing] -> pass (J2)

Additionally, 2498 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 827651f2200cefab42dac4c2ae7f80a7149340de --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. aarch64-apple: 2h 46m -> 3h 45m (+35.1%)
  2. x86_64-msvc-ext3: 1h 24m -> 1h 49m (+29.7%)
  3. i686-gnu-nopt-1: 1h 51m -> 2h 22m (+28.6%)
  4. dist-apple-various: 1h 31m -> 1h 55m (+26.8%)
  5. x86_64-gnu-miri: 1h 37m -> 1h 11m (-26.3%)
  6. dist-various-1: 1h 12m -> 57m 43s (-20.0%)
  7. dist-riscv64-linux: 1h 27m -> 1h 12m (-18.1%)
  8. dist-powerpc64-linux-gnu: 1h 31m -> 1h 15m (-17.5%)
  9. x86_64-gnu-llvm-21-2: 1h 35m -> 1h 20m (-16.1%)
  10. dist-x86_64-musl: 2h 4m -> 1h 45m (-15.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 (827651f): 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 -3.0%, secondary 3.1%)

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)
3.1% [1.4%, 4.8%] 2
Improvements ✅
(primary)
-3.0% [-3.0%, -3.0%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -3.0% [-3.0%, -3.0%] 1

Cycles

Results (secondary -5.3%)

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)
- - 0
Improvements ✅
(secondary)
-5.3% [-5.3%, -5.3%] 1
All ❌✅ (primary) - - 0

Binary size

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)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.1% [-0.1%, -0.1%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -0.1% [-0.1%, -0.1%] 1

Bootstrap: 500.795s -> 490.734s (-2.01%)
Artifact size: 394.31 MiB -> 394.28 MiB (-0.01%)

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

Labels

A-compiletest Area: The compiletest test runner A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-run-make Area: port run-make Makefiles to rmake.rs A-rustc-dev-guide Area: rustc-dev-guide A-testsuite Area: The testsuite used to check the correctness of rustc F-explicit_tail_calls `#![feature(explicit_tail_calls)]` merged-by-bors This PR was explicitly merged by bors. PG-exploit-mitigations Project group: Exploit mitigations 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.