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
args-panic.rs
default-backtrace-ice.rs
default-backtrace-ice.stderr
doublepanic.rs
explicit-panic-msg.rs
explicit-panic.rs
fmt-only-once.rs
fmt-only-once.run.stderr
fmt-panic.rs
issue-47429-short-backtraces.legacy.run.stderr
issue-47429-short-backtraces.rs
issue-47429-short-backtraces.v0.run.stderr
location-detail-panic-no-column.rs
location-detail-panic-no-column.run.stderr
location-detail-panic-no-file.rs
location-detail-panic-no-file.run.stderr
location-detail-panic-no-line.rs
location-detail-panic-no-line.run.stderr
location-detail-panic-no-location-info.rs
location-detail-panic-no-location-info.run.stderr
location-detail-unwrap-no-file.rs
location-detail-unwrap-no-file.run.stderr
main-panic.rs
nested_panic_caught.rs
panic-2021.rs
panic-2021.stderr
panic-arg.rs
panic-handler-chain-update-hook.rs
panic-handler-chain.rs
panic-handler-flail-wildly.rs
panic-handler-set-twice.rs
panic-in-dtor-drops-fields.rs
panic-macro-any-wrapped.rs
panic-macro-any.rs
panic-macro-explicit.rs
panic-macro-fmt.rs
panic-macro-owned.rs
panic-macro-static.rs
panic-main.rs
panic-parens.rs
panic-recover-propagate.rs
panic-set-handler.rs
panic-set-unset-handler.rs
panic-short-backtrace-windows-x86_64.rs
panic-short-backtrace-windows-x86_64.run.stderr
panic-take-handler-nop.rs
panic-task-name-none.rs
panic-task-name-owned.rs
panic.rs
result-get-panic.rs
runtime-switch.legacy.run.stderr
runtime-switch.rs
runtime-switch.v0.run.stderr
short-ice-remove-middle-frames-2.rs
short-ice-remove-middle-frames-2.run.stderr
short-ice-remove-middle-frames.rs
short-ice-remove-middle-frames.run.stderr
test-panic.rs
test-should-fail-bad-message.rs
test-should-panic-bad-message.rs
test-should-panic-no-message.rs
unique-panic.rs
while-body-panics.rs
while-panic.rs