-
Notifications
You must be signed in to change notification settings - Fork 498
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
Update closures for edition 2021 disjoint closure capturing #1521
Conversation
@traviscross and/or @JoelMarcey, would you be willing to give this a review to see if it makes sense to you? Various changes:
Here are some resources that might help with review:
If you want to experiment with your own tests, you can annotate closures with the I can try to answer questions or guide you to where things are implemented. |
@ehuss I am happy to have a look. Out of curiosity, how related/out-of-date is https://doc.rust-lang.org/book/ch13-01-closures.html with respect to what is being specified here? (I know you are specifying new stuff, but I am more curious if there are multiple disjointed places on closures in general or not) |
I skimmed through the book chapter, and I don't see anything that is particularly out of date. It doesn't cover disjoint captures, but I'm not surprised since I would consider that a relatively advanced topic and I believe the book tries to avoid getting into those kinds of topics. |
Definitely also affects auto traits. |
Co-authored-by: Josh Triplett <[email protected]>
This updates the closure documentation to incorporate the changes for RFC 2229 disjoint closure captures in Edition 2021.
This is a repost of #1059 with some changes that I applied. I'm still not 100% confident in this, but I think it is getting close.
Closes #1066