From 8949cf20a274d42f91dbd8c5fc03ae9dccbe3cfb Mon Sep 17 00:00:00 2001 From: Frank Steffahn Date: Tue, 23 Jun 2026 18:53:23 +0200 Subject: [PATCH] Make normalization in a test case resilient to dist compilation The new normalization regex is taken from many existing test cases, see: 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` or `tests/ui/treat-err-as-bug/err.rs` --- tests/rustdoc-ui/ice-bug-report-url.rs | 2 +- tests/rustdoc-ui/ice-bug-report-url.stderr | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/tests/rustdoc-ui/ice-bug-report-url.rs b/tests/rustdoc-ui/ice-bug-report-url.rs index 2e384fa1be623..5aa82c438fa36 100644 --- a/tests/rustdoc-ui/ice-bug-report-url.rs +++ b/tests/rustdoc-ui/ice-bug-report-url.rs @@ -4,7 +4,7 @@ //@ normalize-stderr: "note: compiler flags.*\n\n" -> "" //@ normalize-stderr: "note: rustc.*running on.*" -> "note: rustc {version} running on {platform}" -//@ normalize-stderr: "thread.*panicked at compiler.*" -> "" +//@ normalize-stderr: "thread 'rustc'.*panicked.*:\n.*\n" -> "" //@ normalize-stderr: " +\d{1,}: .*\n" -> "" //@ normalize-stderr: " + at .*\n" -> "" //@ normalize-stderr: ".*note: Some details are omitted.*\n" -> "" diff --git a/tests/rustdoc-ui/ice-bug-report-url.stderr b/tests/rustdoc-ui/ice-bug-report-url.stderr index bc46b226a703e..01dac0433e630 100644 --- a/tests/rustdoc-ui/ice-bug-report-url.stderr +++ b/tests/rustdoc-ui/ice-bug-report-url.stderr @@ -5,8 +5,6 @@ LL | fn wrong() | ^ expected one of `->`, `where`, or `{` - -aborting due to `-Z treat-err-as-bug=1` stack backtrace: error: the compiler unexpectedly panicked. This is a bug