Forbid *-pass and *-fail directives in tests/crashes#155712
Merged
rust-bors[bot] merged 1 commit intorust-lang:mainfrom Apr 24, 2026
Merged
Forbid *-pass and *-fail directives in tests/crashes#155712rust-bors[bot] merged 1 commit intorust-lang:mainfrom
*-pass and *-fail directives in tests/crashes#155712rust-bors[bot] merged 1 commit intorust-lang:mainfrom
Conversation
Crash tests are always expected to crash during compilation, so there is no sensible meaning for specifying a pass/fail expectation in a crash test.
Collaborator
|
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. |
jieyouxu
approved these changes
Apr 24, 2026
Contributor
jhpratt
added a commit
to jhpratt/rust
that referenced
this pull request
Apr 24, 2026
Forbid `*-pass` and `*-fail` directives in tests/crashes Crash tests are always expected to crash during compilation, so there is no sensible meaning for specifying a pass expectation or a run-fail expectation in a crash test. It could conceivably be useful to use failure expectations to specify whether a crash test requires codegen in order to crash, but currently none of the crash tests try to do that. If that functionality is desired in the future, we can always look into re-adding it after the internals of pass/fail expectations have been cleaned up a bit. --- After this change, pass/fail directives are only allowed in UI tests, which should make it easier to overhaul and simplify their implementation. r? jieyouxu
This was referenced Apr 24, 2026
rust-bors Bot
pushed a commit
that referenced
this pull request
Apr 24, 2026
Rollup of 9 pull requests Successful merges: - #155684 (Generalize IO Traits for `Arc<T>` where `&T: IoTrait`) - #155081 (Move and clean up some ui test) - #155379 (Avoid query cycles in DataflowConstProp) - #155663 (Eliminate `CrateMetadataRef`.) - #155669 (Add `Sender` diagnostic item for `std::sync::mpsc::Sender`) - #155698 (Syntactically reject tuple index shorthands in struct patterns to fix a correctness regression) - #155703 (Remove myself as a maintainer of `wasm32-wasip1-threads`) - #155706 (Remove `AttributeLintKind` variants - part 7) - #155712 (Forbid `*-pass` and `*-fail` directives in tests/crashes)
rust-timer
added a commit
that referenced
this pull request
Apr 24, 2026
Rollup merge of #155712 - Zalathar:crashes, r=jieyouxu Forbid `*-pass` and `*-fail` directives in tests/crashes Crash tests are always expected to crash during compilation, so there is no sensible meaning for specifying a pass expectation or a run-fail expectation in a crash test. It could conceivably be useful to use failure expectations to specify whether a crash test requires codegen in order to crash, but currently none of the crash tests try to do that. If that functionality is desired in the future, we can always look into re-adding it after the internals of pass/fail expectations have been cleaned up a bit. --- After this change, pass/fail directives are only allowed in UI tests, which should make it easier to overhaul and simplify their implementation. r? jieyouxu
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Crash tests are always expected to crash during compilation, so there is no sensible meaning for specifying a pass expectation or a run-fail expectation in a crash test.
It could conceivably be useful to use failure expectations to specify whether a crash test requires codegen in order to crash, but currently none of the crash tests try to do that. If that functionality is desired in the future, we can always look into re-adding it after the internals of pass/fail expectations have been cleaned up a bit.
After this change, pass/fail directives are only allowed in UI tests, which should make it easier to overhaul and simplify their implementation.
r? jieyouxu