Skip to content

Rollup of 6 pull requests - #156397

Closed
JonathanBrouwer wants to merge 15 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-JwcK6An
Closed

Rollup of 6 pull requests#156397
JonathanBrouwer wants to merge 15 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-JwcK6An

Conversation

@JonathanBrouwer

Copy link
Copy Markdown
Member

Successful merges:

r? @ghost

Create a similar rollup

cijiugechu and others added 15 commits April 30, 2026 14:19
This commit introduces `PassFailMode` as an internal detail of `TestProps`, but
the full migration is left to a subsequent commit.
And introduce a has_mnemonic method on CodegenBackend just like
--print=backend-has-zstd
…s, r=notriddle

rustdoc: Reify emission types

Implements rust-lang#155374 (comment):

Instead of maintaining the hidden assumption or invariant that `opts.emit.is_empty()` actually means "emit default artifacts" (i.e., `[HtmlStaticFiles, HtmlNonStaticFiles]` under output format `html`; "`[???]`" under output format `json`), actually *reify* the list of emission types so the rest of the code doesn't need to keep this in mind.

I'm not sure if you like this. It's a tinge overengineered, maybe, but it's more robust I claim.

This PR also rejects `--emit` when `--output-format doctest -Zunstable-options` is passed since the latter doesn't honor emission types at all (yet).
…kang

Fix closure HIR span context mismatch

Ensure span has the closure expression's SyntaxContext.

Closes rust-lang#155724
…wiser

Handle --print=backend-has-mnemonic in cg_clif

And introduce a `has_mnemonic` method on `CodegenBackend` just like `--print=backend-has-zstd`.
compiletest: Migrate from `PassMode`/`FailMode` to `PassFailMode`

Every UI test has an explicit or implicit “pass/fail mode” (e.g. `check-fail` or `build-pass`) that was historically stored in two separate optional fields (`pass_mode` and `fail_mode`). That split made it very hard to determine how the respective values were actually produced and consumed, especially in the presence of `--pass=check` on the command-line, or when building auxiliary crates.

This PR replaces the separate fields and enums for pass-mode and fail-mode with a single `PassFailMode` enum and a single `pass_fail_mode` field.

With this new representation, it should hopefully be easier to understand and modify the pass/fail-mode logic.

---

In order to focus on the main migration, I have mostly refrained from subsequent cleanups.

r? jieyouxu
…r=nia-e

stream_send_recv_stress tests: wait for threads to finish

These tests currently fail in Miri (when run with nextest) because all they do is spawn a lot of threads that will do stuff, but they don't wait for the threads to actually finish. Miri by default errors when there are background threads lingering when `main` is done (since that can indicate a leak, and since it makes it impossible to check for memory leaks). Miri gives background threads a bit of time to finish when `main` is done, but for these tests that's nowhere near enough since basically the entire test runs after `main` is done.

Outside Miri, this could also still mean that the test doesn't actually run to completion, it might get abort when `main` finishes.

So let's use `thread::scope` to ensure all threads are done before the test is considered done.
…nt, r=Nadrieril

Fix invalid unreachable in is_known_valid_scrutinee for Reborrow

Fixes rust-lang#156304

Part of the Reborrow traits experiment rust-lang#145612
@rust-bors rust-bors Bot added the rollup A PR which is a rollup label May 10, 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-rustdoc-json Area: Rustdoc JSON backend A-testsuite Area: The testsuite used to check the correctness of rustc 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-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output. labels May 10, 2026
@JonathanBrouwer

Copy link
Copy Markdown
Member Author

@bors r+ rollup=never p=5

@rust-bors

rust-bors Bot commented May 10, 2026

Copy link
Copy Markdown
Contributor

📌 Commit d33589d 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 May 10, 2026
@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request May 10, 2026
…uwer

Rollup of 6 pull requests

Successful merges:

 - #155679 (rustdoc: Reify emission types)
 - #155982 (Fix closure HIR span context mismatch)
 - #156323 (Handle --print=backend-has-mnemonic in cg_clif)
 - #156129 (compiletest: Migrate from `PassMode`/`FailMode` to `PassFailMode`)
 - #156365 (stream_send_recv_stress tests: wait for threads to finish)
 - #156368 (Fix invalid unreachable in is_known_valid_scrutinee for Reborrow)
@rust-log-analyzer

Copy link
Copy Markdown
Collaborator

The job x86_64-gnu-llvm-21-1 failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
test expr_store::scope::tests::macro_inner_item ... ok
test expr_store::scope::tests::test_resolve_local_name_shadow ... ok
test expr_store::tests::body::array_element_cfg ... ok
test expr_store::scope::tests::test_shadow_variable ... ok
error: test failed, to rerun pass `-p hir-def --lib`

Caused by:
  process didn't exit successfully: `/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/hir_def-c439368f2b64a049 '--skip=tests::smoke_test_real_sysroot_cargo' --skip=check_code_formatting -Z unstable-options --format json` (signal: 11, SIGSEGV: invalid memory reference)
Bootstrap failed while executing `--stage 2 test --skip tests --skip coverage-map --skip coverage-run --skip library --skip tidyselftest`
Build completed unsuccessfully in 0:59:28
  local time: Sun May 10 15:18:51 UTC 2026
  network time: Sun, 10 May 2026 15:18:51 GMT
##[error]Process completed with exit code 1.

@rust-bors rust-bors Bot 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 May 10, 2026
@rust-bors

rust-bors Bot commented May 10, 2026

Copy link
Copy Markdown
Contributor

💔 Test for 176780e failed: CI. Failed job:

@JonathanBrouwer

Copy link
Copy Markdown
Member Author

@bors retry

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

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request May 10, 2026
…uwer

Rollup of 6 pull requests

Successful merges:

 - #155679 (rustdoc: Reify emission types)
 - #155982 (Fix closure HIR span context mismatch)
 - #156323 (Handle --print=backend-has-mnemonic in cg_clif)
 - #156129 (compiletest: Migrate from `PassMode`/`FailMode` to `PassFailMode`)
 - #156365 (stream_send_recv_stress tests: wait for threads to finish)
 - #156368 (Fix invalid unreachable in is_known_valid_scrutinee for Reborrow)
@rust-log-analyzer

Copy link
Copy Markdown
Collaborator

The job x86_64-gnu-llvm-21-1 failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
test expr_store::scope::tests::test_resolve_local_name_shadow ... ok
test expr_store::scope::tests::test_shadow_variable ... ok
test expr_store::tests::body::array_element_cfg ... ok
test expr_store::tests::body::async_fn_weird_param_patterns ... ok
error: test failed, to rerun pass `-p hir-def --lib`

Caused by:
  process didn't exit successfully: `/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/hir_def-c439368f2b64a049 '--skip=tests::smoke_test_real_sysroot_cargo' --skip=check_code_formatting -Z unstable-options --format json` (signal: 11, SIGSEGV: invalid memory reference)
Bootstrap failed while executing `--stage 2 test --skip tests --skip coverage-map --skip coverage-run --skip library --skip tidyselftest`
Build completed unsuccessfully in 1:03:59
  local time: Sun May 10 16:42:20 UTC 2026
  network time: Sun, 10 May 2026 16:42:20 GMT
##[error]Process completed with exit code 1.

@rust-bors rust-bors Bot 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 May 10, 2026
@rust-bors

rust-bors Bot commented May 10, 2026

Copy link
Copy Markdown
Contributor

💔 Test for c2f2bfb failed: CI. Failed job:

@rust-bors rust-bors Bot added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label May 10, 2026
@rust-bors

rust-bors Bot commented May 10, 2026

Copy link
Copy Markdown
Contributor

This pull request was unapproved due to being closed.

@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label May 10, 2026
@JonathanBrouwer
JonathanBrouwer deleted the rollup-JwcK6An branch August 21, 2026 08:12
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-rustdoc-json Area: Rustdoc JSON backend A-testsuite Area: The testsuite used to check the correctness of rustc 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. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants