-
-
Notifications
You must be signed in to change notification settings - Fork 103
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
Is there a reason that Report
doesn't implement Error
and Diagnostic
?
#366
Labels
question
Further information is requested
Comments
Same reason |
Haha, a good answer, and a very very painfully correct one: #368 Even if we give up on having a |
This was referenced Apr 25, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I've maybe not done enough thinking on this yet, but it would seem that https://docs.rs/miette/latest/miette/struct.Error.html can be converted to all sorts of
Error
orDiagnostic
trait objects, but doesn't implement either of those traits itself?I was wondering if that was done intentionally, or if that might be another helpful PR?
Perhaps in addition to that, is there a reason there isn't a blanket impl for
Box<T>
whereT: Diagnostic
?I've got this kinda hacky code, and I'll be adding an impl to manually deal with
Report
, but ideally I wouldn't need this intermediate trait?My manual impl for
Report
also isn't working, I think because thatBox<T>
blanket impl is missing... This code:returns this error, once I try to pass it to
.report_error()
:Let me know if I'm crazy, or if adding those impls would help ergonomics!
The text was updated successfully, but these errors were encountered: