-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Default panic message should print Box<dyn Any> #86074
Conversation
Prior to this patch, the default panic message (resulting from calling `panic_any(42);` for example), would print the following error message: ``` thread 'main' panicked at 'Box<Any>', ... ``` However, this should be `Box<dyn Any>` instead.
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @joshtriplett (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
@bors r+ rollup |
📌 Commit eb3fd6d has been approved by |
Thanks for the fix! |
This comment has been minimized.
This comment has been minimized.
This patch fixes tests from failing that were matching on `Box<Any>`, which was the old panic message. Since the new panic message is `Box<dyn Any>`, the tests have been updated to match against this instead.
@bors r- (until ci is passing) |
@bors r+ |
📌 Commit 8330233 has been approved by |
Default panic message should print Box<dyn Any> Closes rust-lang#86039 Prior to this patch, the panic message from running the following code would be `thread 'main' panicked at 'Box<Any>'...` ```rust use std::panic::panic_any; fn main() { panic_any(42); } ``` This patch updates the phrasing to be more consistent. It now instead shows the following panic message: ``` thread 'main' panicked at 'Box<dyn Any>', ... ``` It's a very small fix 😄
Default panic message should print Box<dyn Any> Closes rust-lang#86039 Prior to this patch, the panic message from running the following code would be `thread 'main' panicked at 'Box<Any>'...` ```rust use std::panic::panic_any; fn main() { panic_any(42); } ``` This patch updates the phrasing to be more consistent. It now instead shows the following panic message: ``` thread 'main' panicked at 'Box<dyn Any>', ... ``` It's a very small fix 😄
Rollup of 11 pull requests Successful merges: - rust-lang#85906 (Use `Iterator::find` instead of open-coding it) - rust-lang#85951 (Update the documentation of `-C force-unwind-tables` for rust-lang#83482) - rust-lang#85985 (Clarify documentation of slice sorting methods) - rust-lang#85989 (Remove rustfmt tests from top-level .gitattributes) - rust-lang#86074 (Default panic message should print Box<dyn Any>) - rust-lang#86078 (Type page font weight) - rust-lang#86090 (:arrow_up: rust-analyzer) - rust-lang#86095 (Search description codeblock) - rust-lang#86096 (Comment out unused error codes and add description for E0316) - rust-lang#86101 (Correct type signature in doc for Bound::as_mut) - rust-lang#86103 (Remove lifetime hack) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Update `Box<Any>` to `Box<dyn Any>` in `catch_panic.stderr` https://github.com/rust-lang-ci/rust/runs/2771244703#step:25:9487 cc rust-lang/rust#86133 rust-lang/rust#86074
Closes #86039
Prior to this patch, the panic message from running the following code would be
thread 'main' panicked at 'Box<Any>'...
This patch updates the phrasing to be more consistent. It now instead shows the following panic message:
It's a very small fix 😄