-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Decide on bounds syntax for async closures (RFC 3668) #128129
Comments
Why are the 3 alternatives even considered in the first place? It feels like the team is trying to setup strawmans to divert attention away from the pros and cons between If |
I think at this point it's basically useless to consider anything other than |
I agree with you that we should just limit our focus to However, this summary implies to me bad faith, and I don't think that's warranted. Those suggestions arose because there were some who felt that having some kind of syntax makes sense (for a variety of reasons, but mostly about forwards compatibility) but specifically didn't like |
As a user I expect that |
+1 for |
I personally find I think the reason is that the |
I think we need to take this and look in the future at other potential async traits. If we go with Likewise, if we go with I'm not sure what I like more, to be honest. I can see |
This thread is not the right place to have discussions. Please refer to zulip: https://rust-lang.zulipchat.com/#narrow/stream/213817-t-lang/topic/Async.20closures.20bounds.20syntax where a lot of this has been discussed at length. This issue exists to track the requirement to decide this before stabilization, but like most tracking issues is not particularly a great place for discusions. Please also refer to the RFC and the lang team notes where this was last discussed. |
I'm gonna close this since we've stabilize async closures with |
Prior to stabilization, we need to decide which syntax to use for async closure bounds. This was left as an open question in RFC 3668.
The main known candidates are:
F: async FnMut() -> T
F: AsyncFnMut() -> T
Other candidates discussed have included:
F: async mut fn() -> T
F: async mut () -> T
F: async mut || -> T
F: async fn(&mut self) -> T
F: AsyncFn(&mut self) -> T
F: async |&mut self| -> T
Tracking:
#![feature(async_closure)]
(RFC 2394 / RFC 3668) #62290@rustbot labels +T-lang +I-lang-nominated
cc @compiler-errors @rust-lang/lang
The text was updated successfully, but these errors were encountered: