-
-
Notifications
You must be signed in to change notification settings - Fork 123
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
Add #[diagnostic(transparent)]
#36
Conversation
Isn't single field structs (newtypes) literally one of the main use cases for |
Yeah I guess, I'll add it lol |
This looks good. Do you mind fixing the tests? |
It's just clippy I think, but yep Once I do, hold off merging for a sec, I've got something else to show you first. I think it solves the issue I raised in #16 about being able to forward just the snippets and override whatever else. Probably a separate PR but you should see it I think |
Ok clippy done. My extra work is over at https://github.com/cormacrelf/miette/tree/forwarding. This PR just gives you The forwarding branch, in addition to that, adds a The question before we land this PR is a bikeshed, whether these two different argument names for arguably the same functionality are a good idea or not. Which is preferable of these?
What do you reckon? Not a blocker here because all the real options include this PR as-is IMO. But there you go. (Also, while I was testing this stuff I fixed a couple of things with the thiserror-style display, which worked for the crazy test cases at the top but not simple |
idk seems fine. Let's try it out! |
This has been released as part of [email protected] |
Fixes #16.
I struggled hard naming some of the syntax structs/enums so rename them if you can think of something better. I also didn't implement it for single field structs, mainly because I couldn't be bothered. The only reason I can imagine that being useful is wrapping a foreign diagnostic type, and adding impls for std traits like PartialEq, etc. If anyone needs that it wouldn't be hard.