-
Notifications
You must be signed in to change notification settings - Fork 52
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
build_method into type parameters #104
Comments
#95 is probably a better way to do what you want to do. It's still a WiP though, so you can't use it yet. The problem is that I parse Maybe some day I'll replace it with a manual parsing (that still uses the syn crate, but doesn't pretend the attribute is something it is not) which will make such syntax possible. Don't hold your breath though. Luckily, the turbofish syntax - which is required in expressions - can also be used for types. This means that this works: #[builder(build_method(into = Result::<Index>))] Not as pretty, but it's going to have to do. |
Yep, I understand, parsing macros can be gnarly. Your suggested workaround is good enough, thanks! |
Hello and thank you for this amazing project! It makes builder type state so much easier to use, it's a joy!
I've come across a small issue. I have
into = Result<Index>
is not parsed correctly as apparently the macro does not expect type params. I can work around this withtype IndexResult = Result<Index>;
but it would be cool if this could be supported directly.Thank you!
The text was updated successfully, but these errors were encountered: