macros: fix mut patterns in select!
macro by Darksonn · Pull Request #4211 · tokio-rs/tokio (original) (raw)
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 andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Conversation5 Commits2 Checks0 Files changed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
[ Show hidden characters]({{ revealButtonHref }})
I am rather confident that this cannot be done without a new proc-macro. I spent some time trying to restructure the macro to avoid matching twice, but I was unable to because we need the futures
variable to go out of scope before the success handlers run.
I'll take a look. We probably want @taiki-e to 👀 at it as well.
@Darksonn is there a downside for the user to a new proc macro?
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks fine to me. I would love it if @taiki-e could take a glance, but nothing stands out to me.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
hawkw added a commit that referenced this pull request
1.14.0 (November 15, 2021)
Fixed
- macros: fix compiler errors when using
mut
patterns inselect!
([#4211]) - sync: fix a data race between
oneshot::Sender::send
and awaiting aoneshot::Receiver
when the oneshot has been closed ([#4226]) - sync: make
AtomicWaker
panic safe ([#3689]) - runtime: fix basic scheduler dropping tasks outside a runtime context ([#4213])
Added
Changed
- io: updated
copy
buffer size to matchstd::io::copy
([#4209])
Documented
[#4211]: #4211 [#4226]: #4226 [#3689]: #3689 [#4213]: #4213 [#4179]: #4179 [#4223]: #4223 [#4209]: #4209 [#4230]: #4230 [#4212]: #4212
hawkw mentioned this pull request
hawkw added a commit that referenced this pull request
1.14.0 (November 15, 2021)
Fixed
- macros: fix compiler errors when using
mut
patterns inselect!
([#4211]) - sync: fix a data race between
oneshot::Sender::send
and awaiting aoneshot::Receiver
when the oneshot has been closed ([#4226]) - sync: make
AtomicWaker
panic safe ([#3689]) - runtime: fix basic scheduler dropping tasks outside a runtime context ([#4213])
Added
Changed
- io: updated
copy
buffer size to matchstd::io::copy
([#4209])
Documented
[#4211]: #4211 [#4226]: #4226 [#3689]: #3689 [#4213]: #4213 [#4179]: #4179 [#4223]: #4223 [#4209]: #4209 [#4230]: #4230 [#4212]: #4212
hawkw added a commit that referenced this pull request
1.14.0 (November 15, 2021)
Fixed
- macros: fix compiler errors when using
mut
patterns inselect!
([#4211]) - sync: fix a data race between
oneshot::Sender::send
and awaiting aoneshot::Receiver
when the oneshot has been closed ([#4226]) - sync: make
AtomicWaker
panic safe ([#3689]) - runtime: fix basic scheduler dropping tasks outside a runtime context ([#4213])
Added
Changed
- io: updated
copy
buffer size to matchstd::io::copy
([#4209])
Documented
[#4211]: #4211 [#4226]: #4226 [#3689]: #3689 [#4213]: #4213 [#4179]: #4179 [#4223]: #4223 [#4209]: #4209 [#4230]: #4230 [#4212]: #4212