about summary refs log tree commit diff
path: root/tests/ui/consts/const-eval/const-eval-query-stack.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-08-01 14:15:09 +0000
committerbors <bors@rust-lang.org>2023-08-01 14:15:09 +0000
commit828bdc2c26f5c95773c4ecf72870919f16417b66 (patch)
tree6e697963b24ec229b1cec777d9b1286864afb5d5 /tests/ui/consts/const-eval/const-eval-query-stack.rs
parentc435af0d5c47a333c7cb7f359f3586d5c9dab3ab (diff)
parent2c5ecf22a2aaaecf0bfc9f3f94259913a1d00c74 (diff)
downloadrust-828bdc2c26f5c95773c4ecf72870919f16417b66.tar.gz
rust-828bdc2c26f5c95773c4ecf72870919f16417b66.zip
Auto merge of #112849 - m-ou-se:panic-message-format, r=thomcc
Change default panic handler message format.

This changes the default panic hook's message format from:

```
thread '{thread}' panicked at '{message}', {location}
```

to

```
thread '{thread}' panicked at {location}:
{message}
```

This puts the message on its own line without surrounding quotes, making it easiser to read. For example:

Before:
```
thread 'main' panicked at 'env variable `IMPORTANT_PATH` should be set by `wrapper_script.sh`', src/main.rs:4:6
```
After:
```
thread 'main' panicked at src/main.rs:4:6:
env variable `IMPORTANT_PATH` should be set by `wrapper_script.sh`
```

---

See this PR by `@nyurik,` which does that for only multi-line messages (specifically because of `assert_eq`): https://github.com/rust-lang/rust/pull/111071

This is the change that does that for *all* panic messages.
Diffstat (limited to 'tests/ui/consts/const-eval/const-eval-query-stack.rs')
-rw-r--r--tests/ui/consts/const-eval/const-eval-query-stack.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/ui/consts/const-eval/const-eval-query-stack.rs b/tests/ui/consts/const-eval/const-eval-query-stack.rs
index 33753dc7445..4eaff494783 100644
--- a/tests/ui/consts/const-eval/const-eval-query-stack.rs
+++ b/tests/ui/consts/const-eval/const-eval-query-stack.rs
@@ -5,7 +5,7 @@
 // normalize-stderr-test "note: we would appreciate a bug report.*\n\n" -> ""
 // normalize-stderr-test "note: compiler flags.*\n\n" -> ""
 // normalize-stderr-test "note: rustc.*running on.*\n\n" -> ""
-// normalize-stderr-test "thread.*panicked.*\n" -> ""
+// normalize-stderr-test "thread.*panicked.*:\n.*\n" -> ""
 // normalize-stderr-test "stack backtrace:\n" -> ""
 // normalize-stderr-test "\s\d{1,}: .*\n" -> ""
 // normalize-stderr-test "\s at .*\n" -> ""