Skip to content

compiletest: Remove rfail support from incremental tests#154751

Merged
rust-bors[bot] merged 1 commit intorust-lang:mainfrom
Zalathar:rfail
Apr 7, 2026
Merged

compiletest: Remove rfail support from incremental tests#154751
rust-bors[bot] merged 1 commit intorust-lang:mainfrom
Zalathar:rfail

Conversation

@Zalathar
Copy link
Copy Markdown
Member

@Zalathar Zalathar commented Apr 3, 2026

Incremental revisions beginning with rfail would cause the incremental test runner to build the test program, expecting success, and then run the test program, expecting failure.

Expecting incremental tests to fail at runtime is of questionable utility, because in almost all cases an equivalent test program can be made to succeed at runtime instead.

Removing rfail support is a small step towards cleaning up compiletest's incremental test runner, and its overall handling of pass/fail expectations.

There was one existing regression test using rfail revisions: tests/incremental/issue-80691-bad-eval-cache.rs. The test code is complex, and reverting the fix in #83220 does not actually cause the test to fail, suggesting that it is no longer a useful regression test. This PR therefore deletes that test.

(An earlier draft of this PR ported the test to run-make, but now it has been removed entirely.)

@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Apr 3, 2026

Some changes occurred in src/tools/compiletest

cc @jieyouxu

The rustc-dev-guide subtree was changed. If this PR only touches the dev guide consider submitting a PR directly to rust-lang/rustc-dev-guide otherwise thank you for updating the dev guide with your changes.

cc @BoxyUwU, @tshepang

@rustbot rustbot added A-compiletest Area: The compiletest test runner 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 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 Apr 3, 2026
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Apr 3, 2026

r? @wesleywiser

rustbot has assigned @wesleywiser.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: @jieyouxu, @oli-obk, @wesleywiser, bootstrap
  • @jieyouxu, @oli-obk, @wesleywiser, bootstrap expanded to 8 candidates
  • Random selection from Mark-Simulacrum, clubby789, jieyouxu, wesleywiser

@Zalathar
Copy link
Copy Markdown
Member Author

Zalathar commented Apr 4, 2026

After some more experimentation, I found that reverting the compiler changes in #83220 on current main does not cause tests/incremental/issue-80691-bad-eval-cache.rs to fail.

That makes me suspect that the regression test is currently not providing any value at all, and that we would be better off just deleting it.

@Zalathar
Copy link
Copy Markdown
Member Author

Zalathar commented Apr 4, 2026

I have pushed an update that simply deletes tests/incremental/issue-80691-bad-eval-cache.rs instead of porting it to run-make.

Incremental revisions beginning with `rfail` would cause the incremental test
runner to build the test program, expecting success, and then run the test
program, expecting failure.

Expecting incremental tests to fail at runtime is of questionable utility,
because in almost all cases an equivalent test program can be made to succeed
at runtime instead.

Removing `rfail` support is a small step towards cleaning up compiletest's
incremental test runner, and its overall handling of pass/fail expectations.

There was one existing regression test using `rfail` revisions:
`tests/incremental/issue-80691-bad-eval-cache.rs`. The test code is complex,
and reverting the fix in RUST-83220 does not actually cause the test to fail,
suggesting that it is no longer a useful regression test. This commit therefore
deletes that test.
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Apr 4, 2026

This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

@wesleywiser
Copy link
Copy Markdown
Member

@bors r+ rollup

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors bot commented Apr 6, 2026

📌 Commit a5181d2 has been approved by wesleywiser

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 6, 2026
rust-bors bot pushed a commit that referenced this pull request Apr 7, 2026
Rollup of 6 pull requests

Successful merges:

 - #154627 (Move `rustc_middle::mir::mono` to `rustc_middle::mono`)
 - #154729 (de-non_const some `Iterator` methods)
 - #154891 (implement `StructuralPartialEq` for `MaybeDangling`)
 - #154894 (Slightly refactor mplace<->ptr conversions)
 - #154751 (compiletest: Remove `rfail` support from incremental tests)
 - #154901 (Update books)
@rust-bors rust-bors bot merged commit 12f51bf into rust-lang:main Apr 7, 2026
11 checks passed
@rustbot rustbot added this to the 1.96.0 milestone Apr 7, 2026
rust-timer added a commit that referenced this pull request Apr 7, 2026
Rollup merge of #154751 - Zalathar:rfail, r=wesleywiser

compiletest: Remove `rfail` support from incremental tests

Incremental revisions beginning with `rfail` would cause the incremental test runner to build the test program, expecting success, and then run the test program, expecting failure.

Expecting incremental tests to fail at runtime is of questionable utility, because in almost all cases an equivalent test program can be made to succeed at runtime instead.

Removing `rfail` support is a small step towards cleaning up compiletest's incremental test runner, and its overall handling of pass/fail expectations.

There was one existing regression test using `rfail` revisions: `tests/incremental/issue-80691-bad-eval-cache.rs`. The test code is complex, and reverting the fix in #83220 does not actually cause the test to fail, suggesting that it is no longer a useful regression test. This PR therefore deletes that test.

(An earlier draft of this PR ported the test to run-make, but now it has been removed entirely.)
@Zalathar Zalathar deleted the rfail branch April 7, 2026 08:54
github-actions bot pushed a commit to rust-lang/miri that referenced this pull request Apr 8, 2026
Rollup of 6 pull requests

Successful merges:

 - rust-lang/rust#154627 (Move `rustc_middle::mir::mono` to `rustc_middle::mono`)
 - rust-lang/rust#154729 (de-non_const some `Iterator` methods)
 - rust-lang/rust#154891 (implement `StructuralPartialEq` for `MaybeDangling`)
 - rust-lang/rust#154894 (Slightly refactor mplace<->ptr conversions)
 - rust-lang/rust#154751 (compiletest: Remove `rfail` support from incremental tests)
 - rust-lang/rust#154901 (Update books)
github-actions bot pushed a commit to rust-lang/rustc-dev-guide that referenced this pull request Apr 8, 2026
Rollup of 6 pull requests

Successful merges:

 - rust-lang/rust#154627 (Move `rustc_middle::mir::mono` to `rustc_middle::mono`)
 - rust-lang/rust#154729 (de-non_const some `Iterator` methods)
 - rust-lang/rust#154891 (implement `StructuralPartialEq` for `MaybeDangling`)
 - rust-lang/rust#154894 (Slightly refactor mplace<->ptr conversions)
 - rust-lang/rust#154751 (compiletest: Remove `rfail` support from incremental tests)
 - rust-lang/rust#154901 (Update books)
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-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 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants