Skip to content

compiletest: Remove the //@ should-ice directive#155411

Merged
rust-bors[bot] merged 1 commit intorust-lang:mainfrom
Zalathar:should-ice
Apr 17, 2026
Merged

compiletest: Remove the //@ should-ice directive#155411
rust-bors[bot] merged 1 commit intorust-lang:mainfrom
Zalathar:should-ice

Conversation

@Zalathar
Copy link
Copy Markdown
Member

The //@ should-ice directive was only being used by one test, which can just as easily use the more general //@ failure-status directive instead.

All of the removed exit-code checks were redundant with other exit-code checks that are still present.


I have manually verified that tests/incremental/delayed_span_bug.rs fails if the failure-status directive is modified or removed.

@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Apr 17, 2026

compiletest directives have been modified. Please add or update docs for the
new or modified directive in src/doc/rustc-dev-guide/.

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
Copy link
Copy Markdown
Collaborator

rustbot commented Apr 17, 2026

r? @clubby789

rustbot has assigned @clubby789.
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

@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 17, 2026
self.fatal_proc_rec("compilation failed!", &proc_res);
}

self.check_no_compiler_crash(&proc_res, self.props.should_ice);
Copy link
Copy Markdown
Member Author

@Zalathar Zalathar Apr 17, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For codegen-units tests, the compiler exit status has already been checked by if !proc_res.status.success() immediately above.

View changes since the review

Comment on lines -87 to -96
self.check_no_compiler_crash(&proc_res, self.props.should_ice);

self.check_compiler_output_for_incr(&proc_res);

if self.props.should_ice {
match proc_res.status.code() {
Some(101) => (),
_ => self.fatal("expected ICE"),
}
}
Copy link
Copy Markdown
Member Author

@Zalathar Zalathar Apr 17, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For incremental cfail tests, the compiler exit status has already been checked by self.check_if_test_should_compile(..) immediately above.

View changes since the review

@Zalathar Zalathar changed the title Remove the //@ should-ice directive compiletest: Remove the //@ should-ice directive Apr 17, 2026
Copy link
Copy Markdown
Member

@jieyouxu jieyouxu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense, thanks. r=me with a doc nit for discoverability
r? me

View changes since this review

Comment thread src/doc/rustc-dev-guide/src/tests/directives.md Outdated
@rustbot rustbot assigned jieyouxu and unassigned clubby789 Apr 17, 2026
This directive was only being used by one test, which can just as easily use
the more general `//@ failure-status` directive instead.

All of the removed exit-code checks were redundant with other exit-code checks
that are still present.
@Zalathar
Copy link
Copy Markdown
Member Author

Added a note to the //@ failure-status docs. I didn't want to reflow the whole table source, so I've left that single line misaligned for now.

@bors r=jieyouxu rollup

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented Apr 17, 2026

📌 Commit 975402e has been approved by jieyouxu

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

Successful merges:

 - #141633 (Suggest to bind `self.x` to `x` when field `x` may be in format string)
 - #152980 (c-variadic: fix implementation on `avr`)
 - #154491 (Extend `core::char`'s documentation of casing issues (and fix a rustdoc bug))
 - #155318 (Use mutable pointers for Unix path buffers)
 - #155335 (Bump bootstrap to 1.96 beta)
 - #155354 (Remove AttributeSafety from BUILTIN_ATTRIBUTES)
 - #154970 (rustdoc: preserve `doc(cfg)` on locally re-exported type aliases)
 - #155095 (changed the information provided by (mut x) to mut x (Fix 155030))
 - #155305 (Make `convert_while_ascii` unsafe)
 - #155358 (ImproperCTypes: Move erasing_region_normalisation into helper function)
 - #155377 (tests/debuginfo/basic-stepping.rs: Remove FIXME related to ZSTs)
 - #155383 (Rearrange `rustc_ast_pretty`)
 - #155384 (triagebot: notify on diagnostic attribute changes)
 - #155386 (Use `box_new` diagnostic item for Box::new suggestions)
 - #155391 (Small refactor of `QueryJob::latch` method)
 - #155395 (Tweak how the "copy path" rustdoc button works to allow some accessibility tool to work with rustdoc)
 - #155396 (`as_ref_unchecked` docs link fix)
 - #155411 (compiletest: Remove the `//@ should-ice` directive)
 - #155413 (fix: typo in `std::fs::hard_link` documentation)
@rust-bors rust-bors Bot merged commit 87315a8 into rust-lang:main Apr 17, 2026
11 checks passed
@rustbot rustbot added this to the 1.97.0 milestone Apr 17, 2026
rust-timer added a commit that referenced this pull request Apr 17, 2026
Rollup merge of #155411 - Zalathar:should-ice, r=jieyouxu

compiletest: Remove the `//@ should-ice` directive

The `//@ should-ice` directive was only being used by one test, which can just as easily use the more general `//@ failure-status` directive instead.

All of the removed exit-code checks were redundant with other exit-code checks that are still present.

---

I have manually verified that `tests/incremental/delayed_span_bug.rs` fails if the failure-status directive is modified or removed.
@Zalathar Zalathar deleted the should-ice branch April 17, 2026 11:27
github-actions Bot pushed a commit to rust-lang/rustc-dev-guide that referenced this pull request Apr 20, 2026
Rollup of 19 pull requests

Successful merges:

 - rust-lang/rust#141633 (Suggest to bind `self.x` to `x` when field `x` may be in format string)
 - rust-lang/rust#152980 (c-variadic: fix implementation on `avr`)
 - rust-lang/rust#154491 (Extend `core::char`'s documentation of casing issues (and fix a rustdoc bug))
 - rust-lang/rust#155318 (Use mutable pointers for Unix path buffers)
 - rust-lang/rust#155335 (Bump bootstrap to 1.96 beta)
 - rust-lang/rust#155354 (Remove AttributeSafety from BUILTIN_ATTRIBUTES)
 - rust-lang/rust#154970 (rustdoc: preserve `doc(cfg)` on locally re-exported type aliases)
 - rust-lang/rust#155095 (changed the information provided by (mut x) to mut x (Fix 155030))
 - rust-lang/rust#155305 (Make `convert_while_ascii` unsafe)
 - rust-lang/rust#155358 (ImproperCTypes: Move erasing_region_normalisation into helper function)
 - rust-lang/rust#155377 (tests/debuginfo/basic-stepping.rs: Remove FIXME related to ZSTs)
 - rust-lang/rust#155383 (Rearrange `rustc_ast_pretty`)
 - rust-lang/rust#155384 (triagebot: notify on diagnostic attribute changes)
 - rust-lang/rust#155386 (Use `box_new` diagnostic item for Box::new suggestions)
 - rust-lang/rust#155391 (Small refactor of `QueryJob::latch` method)
 - rust-lang/rust#155395 (Tweak how the "copy path" rustdoc button works to allow some accessibility tool to work with rustdoc)
 - rust-lang/rust#155396 (`as_ref_unchecked` docs link fix)
 - rust-lang/rust#155411 (compiletest: Remove the `//@ should-ice` directive)
 - rust-lang/rust#155413 (fix: typo in `std::fs::hard_link` documentation)
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-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.

4 participants