Forbid check-pass/build-pass/run-pass directives in incremental tests#155589
Forbid check-pass/build-pass/run-pass directives in incremental tests#155589rust-bors[bot] merged 4 commits intorust-lang:mainfrom
check-pass/build-pass/run-pass directives in incremental tests#155589Conversation
|
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. Some changes occurred in src/tools/compiletest cc @jieyouxu |
| //@ revisions: bfail1 bfail2 | ||
| //@ revisions: bpass1 bpass2 | ||
| //@ compile-flags: -Z query-dep-graph | ||
| //@ aux-build:point.rs | ||
| //@ build-pass |
There was a problem hiding this comment.
Question: I was staring at this for like a good minute trying to understand why this previously worked... This is because the previous revision names are just misleading, right?
There was a problem hiding this comment.
Yeah, that was one of the big confusions that prompted me to go down the path of trying to clean this stuff up.
For whatever reason, it used to be the case that bfail (historically cfail) was the only revision kind that supported *-pass directives and diagnostic checks. So if someone wanted those checks, they would use a bfail revision and combine it with directives to explicitly expect success instead of failure. Very confusing.
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.
|
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. |
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.
|
PR CI is green. @bors r=jieyouxu |
|
My longer-term plan is to eventually forbid I currently have a local draft PR to forbid |
Sounds good 👍 |
Rollup of 7 pull requests Successful merges: - #155589 (Forbid `check-pass`/`build-pass`/`run-pass` directives in incremental tests) - #155610 (Add missing `dyn` keyword to `trait_alias` page of the Unstable Book) - #155615 (test cleanups for `ui/derives` and `ui/deriving`) - #154874 (Fix ICE for inherited const conditions on const closures) - #155605 (std: Update support for `wasm32-wasip3`) - #155613 (c-variadic: tweak `std` docs) - #155619 (Remove a bunch of unnecessary explicit lifetimes from the ast validator)
Rollup merge of #155589 - Zalathar:cpass, r=jieyouxu Forbid `check-pass`/`build-pass`/`run-pass` directives in incremental tests - Follow-up to #155474 --- 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
Rollup of 7 pull requests Successful merges: - rust-lang/rust#155589 (Forbid `check-pass`/`build-pass`/`run-pass` directives in incremental tests) - rust-lang/rust#155610 (Add missing `dyn` keyword to `trait_alias` page of the Unstable Book) - rust-lang/rust#155615 (test cleanups for `ui/derives` and `ui/deriving`) - rust-lang/rust#154874 (Fix ICE for inherited const conditions on const closures) - rust-lang/rust#155605 (std: Update support for `wasm32-wasip3`) - rust-lang/rust#155613 (c-variadic: tweak `std` docs) - rust-lang/rust#155619 (Remove a bunch of unnecessary explicit lifetimes from the ast validator)
cfail/cpassrevisions tobfail/bpass#155474This PR forbids the use of
//@ check-pass,//@ build-pass, and//@ run-passdirectives in incremental tests. Tests that would have used those directives should use a revision name beginning withcpass/bpass/rpassinstead.(The
*-faildirectives are already forbidden in incremental tests.)Existing incremental tests that used the
check-passandbuild-passdirectives have been migrated. To allow migration of the check-pass tests, this PR also adds support for revision names beginning withcpass. No incremental tests were usingrun-pass.Several of the migrated
build-passtests have a FIXME indicating that they could potentially be migrated tocheck-passinstead. 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