-
-
Notifications
You must be signed in to change notification settings - Fork 125
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
doc: document #[diagnostic(transparent)]
#266
Conversation
@@ -198,6 +198,18 @@ | |||
//! #[error("Oops it blew up")] | |||
//! #[diagnostic(code(my_lib::bad_code))] | |||
//! BadThingHappened, | |||
//! | |||
//! #[error(transparent)] |
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.
Shouldn't #[diagnostic(transparent)]
imply #[error(transparent)]
?
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.
miette is blissfully unaware of thiserror. They are completely separate macros, and miette doesn't actually do anything related to std::error::Error
itself.
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.
@zkat If you're using darling (https://github.com/TedDriggs/darling) you can parse #[error]
attributes and infer settings from it. This would help to avoid all the duplicate info in some cases.
|
#[diagnostic(transparent)]
#[diagnostic(transparent)]
You need to install cargo-make first |
@zkat Hi! I've updated readme. Do I need to do something else to get this merged? |
No description provided.