mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 17:24:06 +00:00
828bdc2c26
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.
15 lines
634 B
Plaintext
15 lines
634 B
Plaintext
thread 'main' panicked at $DIR/short-ice-remove-middle-frames-2.rs:56:5:
|
|
debug!!!
|
|
stack backtrace:
|
|
0: std::panicking::begin_panic
|
|
1: short_ice_remove_middle_frames_2::eight
|
|
2: short_ice_remove_middle_frames_2::seven::{{closure}}
|
|
[... omitted 3 frames ...]
|
|
3: short_ice_remove_middle_frames_2::fifth
|
|
4: short_ice_remove_middle_frames_2::fourth::{{closure}}
|
|
[... omitted 4 frames ...]
|
|
5: short_ice_remove_middle_frames_2::first
|
|
6: short_ice_remove_middle_frames_2::main
|
|
7: core::ops::function::FnOnce::call_once
|
|
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
|