Explain the default panic hook better#108105
Conversation
|
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @cuviper (or someone else) soon. Please see the contribution instructions for more information. |
|
Hey! It looks like you've submitted a new PR for the library teams! If this PR contains changes to any Examples of
|
|
Thanks, I've fixed it. Are the commits fine as-is, or would you prefer I squashed the typo commits into the first commit? |
|
If you're willing and able to squash, that's a little nicer, but it's not a big deal either way. |
This changes the documentation of `std::panic::set_hook` and `take_hook` to better explain how the default panic hook works. In particular the fact that `take_hook` registers the default hook, rather than no hook at all, was missing from the docs.
|
Okay, commits squashed. I also changed this line: |
|
@bors r+ rollup |
Rollup of 7 pull requests Successful merges: - rust-lang#108000 (lint: don't suggest MaybeUninit::assume_init for uninhabited types) - rust-lang#108105 (Explain the default panic hook better) - rust-lang#108141 (Add rpitit queries) - rust-lang#108272 (docs: wrong naming convention in struct keyword doc) - rust-lang#108285 (remove unstable `pick_stable_methods_before_any_unstable` flag) - rust-lang#108289 (Name placeholder in some region errors) - rust-lang#108290 (Add a test for default trait method with RPITITs) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
This changes the documentation of
std::panic::set_hookandtake_hookto explain how the default panic hook works. In particular the fact thattake_hookregisters the default hook, rather than no hook at all, was missing from the docs.I also reworded a few things for clarity.