-
Notifications
You must be signed in to change notification settings - Fork 46
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
Properly handle mutability for awaited futures #239
Conversation
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.
Can you add at least an e2e tests, an a line in change log. Maybe it would be good also to have some unit tests here.
Take a look to https://github.com/la10736/rstest/tree/my_await_mut |
Nice! Thanks for taking over, this looks much better 😁 I'm not too familiar with writing procedural macros yet 👀 shall I close this PR in favor of your changes? |
No, include these changes like are yours and handle tests and change log. |
@la10736 latest change now includes your suggestion for improvement along with e2e and unit tests :) |
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.
Nice. Can you check my notes?
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.
LGTM
Thanks! Can you create a new release with this change @la10736? 🙏🏼 |
I'll try to do it later in the day |
@borchero Done |
Thanks a lot! |
Motivation
Currently, the following code fails to compile:
as (the inner function) expands to
This is most likely undesired: by marking the awaited future value as
mut
, one would expect thata
is mutable.Changes
This PR augments the mutability identifier to result in the following expanded code that now compiles as expected: