Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of rust-lang#110110 - lukas-code:display-panic-info, r=J…
…ohnTitor Use `Display` in top-level example for `PanicInfo` Addresses rust-lang#110098. This confused me as well, when I was writing a `no_std` panic handler for the first time, so here's a better top-level example. `Display` is stable, prints the `.message()` if available, and falls back to `.payload().downcast_ref<&str>()` if the message is not available. So this example should provide strictly more information and also work for formatted panics. The old example still exists on the `payload` method.
- Loading branch information