Skip to content

Commit c7b129a

Browse files
Rollup merge of rust-lang#158318 - steffahn:fix-ice-confusion, r=camelid
Make normalization in a test case resilient to dist compilation This fixes rust-lang#158219 by adapting the `tests/rustdoc-ui/ice-bug-report-url` test case such that it will no longer fail with the remapping prefixes from rust-lang#150110 This was previously sometimes the first test failure if someone tried `x.py test` on a compiler checkout configured with `dist` setup, prominently featuring the new (mismatching) test `stdout` containing the scary ICE error message. --- The new normalization regex is taken from many existing test cases, see: [↝ this code search ⮺](https://github.com/search?q=repo%3Arust-lang%2Frust+%2Fthread+%27rustc%27%5C.%5C*panicked%2F&type=code) which includes files such as [`tests/ui/treat-err-as-bug/span_delayed_bug.rs`](https://github.com/rust-lang/rust/blob/4429659e4745016bd3f26a4a421843edc7fbc422/tests/ui/treat-err-as-bug/span_delayed_bug.rs#L4) or [`tests/ui/treat-err-as-bug/err.rs`](https://github.com/rust-lang/rust/blob/4429659e4745016bd3f26a4a421843edc7fbc422/tests/ui/treat-err-as-bug/err.rs#L4).
2 parents 57d3590 + 8949cf2 commit c7b129a

2 files changed

Lines changed: 1 addition & 3 deletions

File tree

tests/rustdoc-ui/ice-bug-report-url.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
//@ normalize-stderr: "note: compiler flags.*\n\n" -> ""
66
//@ normalize-stderr: "note: rustc.*running on.*" -> "note: rustc {version} running on {platform}"
7-
//@ normalize-stderr: "thread.*panicked at compiler.*" -> ""
7+
//@ normalize-stderr: "thread 'rustc'.*panicked.*:\n.*\n" -> ""
88
//@ normalize-stderr: " +\d{1,}: .*\n" -> ""
99
//@ normalize-stderr: " + at .*\n" -> ""
1010
//@ normalize-stderr: ".*note: Some details are omitted.*\n" -> ""

tests/rustdoc-ui/ice-bug-report-url.stderr

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ LL | fn wrong()
55
| ^ expected one of `->`, `where`, or `{`
66

77

8-
9-
aborting due to `-Z treat-err-as-bug=1`
108
stack backtrace:
119

1210
error: the compiler unexpectedly panicked. This is a bug

0 commit comments

Comments
 (0)