rust/tests/ui/panics
bors 828bdc2c26 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.
2023-08-01 14:15:09 +00:00
..
abort-on-panic.rs Structurally resolve in pattern matching when peeling refs in new solver 2023-07-11 02:40:59 +00:00
args-panic.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
default-backtrace-ice.rs Improve filtering in default-backtrace-ice.rs. 2023-05-05 07:18:06 +10:00
default-backtrace-ice.stderr Change default panic handler message format. 2023-07-29 11:42:50 +02:00
doublepanic.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
explicit-panic-msg.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
explicit-panic.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
fmt-only-once.rs test that we format the panic message only once 2023-04-25 18:11:28 +02:00
fmt-only-once.run.stderr Change default panic handler message format. 2023-07-29 11:42:50 +02:00
fmt-panic.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-47429-short-backtraces.legacy.run.stderr Change default panic handler message format. 2023-07-29 11:42:50 +02:00
issue-47429-short-backtraces.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-47429-short-backtraces.v0.run.stderr Change default panic handler message format. 2023-07-29 11:42:50 +02:00
location-detail-panic-no-column.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
location-detail-panic-no-column.run.stderr Change default panic handler message format. 2023-07-29 11:42:50 +02:00
location-detail-panic-no-file.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
location-detail-panic-no-file.run.stderr Change default panic handler message format. 2023-07-29 11:42:50 +02:00
location-detail-panic-no-line.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
location-detail-panic-no-line.run.stderr Change default panic handler message format. 2023-07-29 11:42:50 +02:00
location-detail-panic-no-location-info.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
location-detail-panic-no-location-info.run.stderr Change default panic handler message format. 2023-07-29 11:42:50 +02:00
location-detail-unwrap-no-file.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
location-detail-unwrap-no-file.run.stderr Change default panic handler message format. 2023-07-29 11:42:50 +02:00
main-panic.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
nested_panic_caught.rs Rework handling of recursive panics 2023-05-27 16:35:16 +02:00
panic-2021.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
panic-2021.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
panic-arg.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
panic-handler-chain-update-hook.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
panic-handler-chain.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
panic-handler-flail-wildly.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
panic-handler-set-twice.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
panic-in-dtor-drops-fields.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
panic-macro-any-wrapped.rs Change default panic handler message format. 2023-07-29 11:42:50 +02:00
panic-macro-any.rs Change default panic handler message format. 2023-07-29 11:42:50 +02:00
panic-macro-explicit.rs Change default panic handler message format. 2023-07-29 11:42:50 +02:00
panic-macro-fmt.rs Change default panic handler message format. 2023-07-29 11:42:50 +02:00
panic-macro-owned.rs Change default panic handler message format. 2023-07-29 11:42:50 +02:00
panic-macro-static.rs Change default panic handler message format. 2023-07-29 11:42:50 +02:00
panic-main.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
panic-parens.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
panic-recover-propagate.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
panic-set-handler.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
panic-set-unset-handler.rs Change default panic handler message format. 2023-07-29 11:42:50 +02:00
panic-short-backtrace-windows-x86_64.rs Add some reasons why tests are ignored. 2023-04-15 16:11:42 -07:00
panic-short-backtrace-windows-x86_64.run.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
panic-take-handler-nop.rs Change default panic handler message format. 2023-07-29 11:42:50 +02:00
panic-task-name-none.rs Change default panic handler message format. 2023-07-29 11:42:50 +02:00
panic-task-name-owned.rs Change default panic handler message format. 2023-07-29 11:42:50 +02:00
panic.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
result-get-panic.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
runtime-switch.legacy.run.stderr Change default panic handler message format. 2023-07-29 11:42:50 +02:00
runtime-switch.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
runtime-switch.v0.run.stderr Change default panic handler message format. 2023-07-29 11:42:50 +02:00
short-ice-remove-middle-frames-2.rs Fix #107910, Shorten backtraces in ICEs 2023-05-17 17:56:26 +08:00
short-ice-remove-middle-frames-2.run.stderr Auto merge of #112849 - m-ou-se:panic-message-format, r=thomcc 2023-08-01 14:15:09 +00:00
short-ice-remove-middle-frames.rs Fix #107910, Shorten backtraces in ICEs 2023-05-17 17:56:26 +08:00
short-ice-remove-middle-frames.run.stderr Auto merge of #112849 - m-ou-se:panic-message-format, r=thomcc 2023-08-01 14:15:09 +00:00
test-panic.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
test-should-fail-bad-message.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
test-should-panic-bad-message.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
test-should-panic-no-message.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unique-panic.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
while-body-panics.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
while-panic.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00