-
Notifications
You must be signed in to change notification settings - Fork 12.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Document unreachable!
custom panic message
#90798
Document unreachable!
custom panic message
#90798
Conversation
The `unreachable!` docs previously did not mention that there was a second form, `unreachable!("message")` that could be used to specify a custom panic message, The docs now mention this in the same style as currently used for `unimplemented!`: https://doc.rust-lang.org/core/macro.unimplemented.html#panics
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @dtolnay (or someone else) soon. Please see the contribution instructions for more information. |
The job Click to see the possible cause of the failure (guessed by this bot)
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
@bors r+ |
📌 Commit b41b2e5 has been approved by |
…askrgr Rollup of 7 pull requests Successful merges: - rust-lang#90589 (rustc_llvm: update PassWrapper for recent LLVM) - rust-lang#90644 (Extend the const swap feature) - rust-lang#90704 (Unix ExitStatus comments and a tiny docs fix) - rust-lang#90761 (Shorten Span of unused macro lints) - rust-lang#90795 (Add more comments to explain the code to generate the search index) - rust-lang#90798 (Document `unreachable!` custom panic message) - rust-lang#90826 (rustc_feature: Convert `BuiltinAttribute` from tuple to a struct) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
The
unreachable!
docs previously did not mention that there was a second form,unreachable!("message")
that could be used to specify a custom panic message,The docs now mention this feature in the same wording as currently used for
unimplemented!
:https://doc.rust-lang.org/core/macro.unimplemented.html#panics