Skip to content

Forbid check-pass/build-pass/run-pass directives in incremental tests#155589

Open
Zalathar wants to merge 4 commits intorust-lang:mainfrom
Zalathar:cpass
Open

Forbid check-pass/build-pass/run-pass directives in incremental tests#155589
Zalathar wants to merge 4 commits intorust-lang:mainfrom
Zalathar:cpass

Conversation

@Zalathar
Copy link
Copy Markdown
Member


This PR forbids the use of //@ check-pass, //@ build-pass, and //@ run-pass directives in incremental tests. Tests that would have used those directives should use a revision name beginning with cpass/bpass/rpass instead.

(The *-fail directives are already forbidden in incremental tests.)

Existing incremental tests that used the check-pass and build-pass directives have been migrated. To allow migration of the check-pass tests, this PR also adds support for revision names beginning with cpass. No incremental tests were using run-pass.


Several of the migrated build-pass tests have a FIXME indicating that they could potentially be migrated to check-pass instead. This PR does not perform that migration.

In the future, I intend to do more cleanup of how compiletest handles pass/fail expectations, but I didn't want to cram too much into one PR.

r? jieyouxu

This is the subset of incremental tests that should continue to use `bpass`
even after `cpass` is supported, because they (presumably) involve codegen.
This is the subset of incremental tests that have a FIXME to consider migrating
to check-pass instead.

That migration is beyond the scope of this PR, but might be attempted later.
Incremental tests that would have used the `check-pass`, `build-pass`, or
`run-pass` directives should instead use a revision name starting with
`cpass`/`bpass`/`rpass` as appropriate.
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Apr 21, 2026

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

Some changes occurred in src/tools/compiletest

cc @jieyouxu

@rustbot rustbot added A-compiletest Area: The compiletest test runner 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 21, 2026
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-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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants