summaryrefslogtreecommitdiff
path: root/tests/rustdoc-js-std/parser-errors.js
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2023-04-14 21:11:12 +0200
committerGitHub <noreply@github.com>2023-04-14 21:11:12 +0200
commit5107c4c556fe9fb319f1330f6562882cf41d3097 (patch)
tree3fc4eb15d3d2d13e92284f193231b9495ffa826a /tests/rustdoc-js-std/parser-errors.js
parent4b8351f62e178909ff4de605ff2ef4a559e38206 (diff)
parentd9f99c36fe5122618a44caf393f9743e84a38c19 (diff)
downloadrust-5107c4c556fe9fb319f1330f6562882cf41d3097.tar.gz
Rollup merge of #110110 - lukas-code:display-panic-info, r=JohnTitor
Use `Display` in top-level example for `PanicInfo` Addresses https://github.com/rust-lang/rust/issues/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.
Diffstat (limited to 'tests/rustdoc-js-std/parser-errors.js')
0 files changed, 0 insertions, 0 deletions