Skip to content

Incorrect info on closures capturing individual struct fields #1519

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

Closed
theemathas opened this issue Jul 1, 2024 · 1 comment
Closed

Incorrect info on closures capturing individual struct fields #1519

theemathas opened this issue Jul 1, 2024 · 1 comment

Comments

@theemathas
Copy link

The reference page on closure types states the following:

Composite types such as structs, tuples, and enums are always captured entirely, not by individual fields. It may be necessary to borrow into a local variable in order to capture a single field

As of edition 2021, this is not true. See the edition guide.

@ehuss
Copy link
Contributor

ehuss commented Jul 1, 2024

Thanks for the report! I believe this is a duplicate of #1066, so closing in favor of that. Coincidentally, I was looking at getting it updated again, so hopefully we'll get some movement.

@ehuss ehuss closed this as not planned Won't fix, can't repro, duplicate, stale Jul 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants