Skip to content
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

Why does Error::downcast<E> and Error::is<E> require E: Debug #270

Open
tomaspecl opened this issue Sep 7, 2022 · 0 comments
Open

Why does Error::downcast<E> and Error::is<E> require E: Debug #270

tomaspecl opened this issue Sep 7, 2022 · 0 comments

Comments

@tomaspecl
Copy link

You can use a type which only implements Display as context for an Error. But then you cant take that Error and downcast it to that type. The downcast<E>, downcast_ref<E>, downcast_mut<E> and is<E> have a requirement that E: Debug but I dont see a reason why it would be needed.

Here is an example:
https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=f862ec4d05048736f45741370f192680

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant