-
Notifications
You must be signed in to change notification settings - Fork 14
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
auto_impl for trait objects? #49
Comments
It would be absolutely possible to extend I'm not quite sure how much work that would be. Hopefully we don't have to copy all the code for the other types, but can instead abstract somehow. Also the Maybe it could be worth it to rewrite much of what we have: instead of hand coding each type we support, we define a table where we list each type and what restrictions it has. Then our system would be super generic and adding types would be easy. I won't have time in the next months to implement this, but I could help you out if you want to try it! |
I had a poke around the source and came to similar conclusions. I was thinking of adding it as something like As far as codegen goes, it would be nice to avoid duplicating all the existing code, but I haven't looked at it closely enough yet to work out how to do that. |
#52 addresses this more precisely. |
The use-case I run into most often is boilerplate for:
Would it be possible to extend auto_impl to this case?
It would also need to support generating impls with autotraits/lifetimes:
The text was updated successfully, but these errors were encountered: