-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Provide a syntax extension to derive traits for a newtype #19597
Comments
cc #14047 |
I believe this is impossible as a syntax extension, since they have no access to the methods and method signatures of the trait to be able to create the impls. I'm willing to be proved wrong, but I also think this requires an RFC. |
(At least, it is impossible to do for arbitrary traits.) |
Yes, this definitely would need an RFC. That said, I would love functionality like this. I'd suggest this issue be closed in favor of an issue in the RFC tracker. |
I think this is a good feature for a version 2 |
Closing in favor of rust-lang/rfcs#261 |
It would be nice to be able to do something like:
The current solution to this problem (implementing the traits manually), causes a lot of boilerplate and makes usage of newtypes less attractive.
If there is enough interest, I would love to submit a PR for this
cc @aturon
The text was updated successfully, but these errors were encountered: