Skip to content

Rollup of 8 pull requests#155672

Closed
JonathanBrouwer wants to merge 23 commits intorust-lang:mainfrom
JonathanBrouwer:rollup-EdT7ent
Closed

Rollup of 8 pull requests#155672
JonathanBrouwer wants to merge 23 commits intorust-lang:mainfrom
JonathanBrouwer:rollup-EdT7ent

Conversation

@JonathanBrouwer
Copy link
Copy Markdown
Contributor

Successful merges:

r? @ghost

Create a similar rollup

dianqk and others added 23 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
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
…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. 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)]` labels Apr 23, 2026
@rustbot rustbot added 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

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,x86_64-mingw-1,i686-msvc-2

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented Apr 23, 2026

📌 Commit 5cfe5b3 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 Bot pushed a commit that referenced this pull request Apr 23, 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-2
@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 Apr 23, 2026
@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented Apr 23, 2026

This pull request was unapproved due to being closed.

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented Apr 23, 2026

☀️ Try build successful (CI)
Build commit: 4f97785 (4f977857749c835a4a2a93e682395b35332d19c3, parent: 5095b44caf4a043fb34250c6a70b78ca59b718e0)

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)]` 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-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.

9 participants