Skip to content

Conversation

@matthiaskrgr
Copy link
Member

@matthiaskrgr matthiaskrgr commented Nov 1, 2025

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

Zalathar and others added 23 commits October 28, 2025 13:25
This "cleanup" function is more than a decade old, and I can't find any
evidence of modern-day bootstrap being able to pass any of these flags to
`--host-rustcflags` or `--target-rustcflags`.
There are probably plenty of tests that will check this incidentally, but it's
convenient to have a dedicated self-test.
In particular, this eliminates the cryptic `of: &TestPaths` parameters.
This method no longer returns a `TestPaths`, so the old name is no longer
appropriate.
…rics

It doesn't seem like this special case is necessary anymore and if it
still is anyway, it should probably be moved to cg_llvm's prepare_lto
instead.
The panic runtime uses #[rustc_std_internal_symbol] which has the same
effect as this special case with respect to symbol visibility.
"running analysis passes on this crate" -> "running analysis passes on crate `foo`"

This message is displayed in cycle errors in particular, and in some cases without any spans or any other identifiable information to determine which dependency introduced the cycle.
Mention crate being analyzed in query description

"running analysis passes on this crate" -> "running analysis passes on crate `foo`"

This message is displayed in cycle errors in particular, and in some cases without any spans or any other identifiable information to determine which dependency introduced the cycle.

Address rust-lang#74380, but we still need a test for that case in particular.
Prepare to move debugger discovery from compiletest to bootstrap

For a while I've been wanting to move debugger discovery out of compiletest and into bootstrap, so that bootstrap would be responsible for deciding which debugger to use, and compiletest would faithfully use that debugger with no extra magic (and no horrible config-duplicating hacks).

Making that change is complicated, and eventually I had so many intertwined preparatory changes that I split them off into this PR, so that it can be reviewed and tested as a smaller chunk.

---

To avoid scope creep, the changes in this PR try to move code as-is as much as possible, even if the moved code could arguably benefit from further cleanups. And in many cases, that code will need to be further overhauled anyway when discovery steps are actually moved out of compiletest.
compiletest: Remove `cleanup_debug_info_options`

This "cleanup" function is more than a decade old, and I can't find any evidence of modern-day bootstrap being able to pass any of these flags to `--host-rustcflags` or `--target-rustcflags`.

I thought about replacing the cleanup with an assertion, but I think it's better to delete it entirely for now, and re-add checks later if they're motivated by actual problems in practice.

In addition to deleting some old and confusing code, this also lets us remove three instances of duplicating `TestCx`, which is the biggest win.

r? jieyouxu
compiletest: Don't modify `testpaths` when creating aux contexts

Modifying `TestCx::testpaths` makes it vastly harder to reason about how compiletest is using test paths, and can be avoided without much trouble by simply passing explicit source-file paths into a small number of auxiliary-aware methods.

---

This PR was originally based on a much larger change that split `TestPaths` into multiple structs and multiple `TestCx` fields (as seen in early revisions of rust-lang#148160), but after further cleanups it turned out that very few tweaks were actually needed to avoid changes to `testpaths`.

r? jieyouxu
…fleLapkin

rustc_codegen: fix musttail returns for cast/indirect ABIs

Fixes rust-lang#148239 rust-lang#144986

Explicit tail calls trigger `bug!` for any callee whose ABI returns via `PassMode::Cast`, and we forgot to to forward the hidden `sret` out-pointer when the ABI requested an indirect return. The former causes ICE, the latter produced malformed IR (wrong codegen) if the return value is large enough to need `sret`.

Updated the musttail helper to accept cast-mode returns, made it so that we pass the return pointer through the tail-call path.

Added two UI tests to demonstrate each case.

This is my first time contributing, please do check if I did it right.

r? theemathas
…, r=WaffleLapkin

Remove two special cases from reachable_non_generics

They are no longer necessary.
…ercote

Do not emit solver errors that contain error types

any follow-up errors are going to either be duplicates or often disappear if the error itself is fixed.

in this PR it mostly silences dyn-compat errors as all the other errors are already deduplicated outside of the test suite. The dyn compat errors are independent errors and I think if the dyn compatiblity depended on an error type it would not actually show, so this is PR is actually silencing independent errors, too.

I am opening this PR because I am seeing lots of `{type error}: const Trait` errors when adding more const checking. So instead of targetting just those specific errors, I wanted to try out fully avoiding such errors near the trait solver.

cc `@rust-lang/types` for thoughts
…r=Noratrieb

docs: makes a note about possible building  `rustc 1.91.0 + host tools` for win7

I have make notes in docs that there is possible to build host tools for target `x86_64-win7-windows-msvc`.

<img width="668" height="331" alt="image" src="https://github.com/user-attachments/assets/0335bc72-963c-4bfd-9910-61963dbf7dd7" />

r? `@roblabla`

`@rustbot` label A-docs  O-windows-7

P.S. prebuilt binaries can be found [here](https://github.com/Fenex/rust-win7/releases).
@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-testsuite Area: The testsuite used to check the correctness of rustc F-explicit_tail_calls `#![feature(explicit_tail_calls)]` 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. labels Nov 1, 2025
@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) rollup A PR which is a rollup labels Nov 1, 2025
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=5

@bors
Copy link
Collaborator

bors commented Nov 1, 2025

📌 Commit a4e8997 has been approved by matthiaskrgr

It is now in the queue for this repository.

@bors bors 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 Nov 1, 2025
@bors
Copy link
Collaborator

bors commented Nov 1, 2025

⌛ Testing commit a4e8997 with merge 0d75160...

bors added a commit that referenced this pull request Nov 1, 2025
Rollup of 8 pull requests

Successful merges:

 - #147137 (Mention crate being analyzed in query description)
 - #148099 (Prepare to move debugger discovery from compiletest to bootstrap)
 - #148194 (compiletest: Remove `cleanup_debug_info_options`)
 - #148199 (compiletest: Don't modify `testpaths` when creating aux contexts)
 - #148240 (rustc_codegen: fix musttail returns for cast/indirect ABIs)
 - #148247 (Remove two special cases from reachable_non_generics)
 - #148290 (Do not emit solver errors that contain error types)
 - #148362 (docs: makes a note about possible building  `rustc 1.91.0 + host tools` for win7)

r? `@ghost`
`@rustbot` modify labels: rollup
@rust-log-analyzer
Copy link
Collaborator

The job arm-android failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
   2: core::panicking::panic
             at /rustc/3b4dd9bf1410f8da6329baa36ce5e37673cbbd1f/library/core/src/panicking.rs:150:5
   3: core::option::unwrap_failed
             at /rustc/3b4dd9bf1410f8da6329baa36ce5e37673cbbd1f/library/core/src/option.rs:2174:5
   4: compiletest::debuggers::discover_gdb::{closure#0}
   5: compiletest::parse_config
   6: compiletest::cli::main
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
Bootstrap failed while executing `--stage 2 test --host= --target arm-linux-androideabi`
Build completed unsuccessfully in 0:39:57

@bors
Copy link
Collaborator

bors commented Nov 2, 2025

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Nov 2, 2025
@Zalathar
Copy link
Member

Zalathar commented Nov 2, 2025

This failure is going to be one of my compiletest PRs; I'll r- them all and sort things out myself.

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-testsuite Area: The testsuite used to check the correctness of rustc F-explicit_tail_calls `#![feature(explicit_tail_calls)]` 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-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