Skip to content

Misdocumented move keyword: move closures are *not* “represented by the FnOnce trait” #74997

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
steffahn opened this issue Aug 1, 2020 · 1 comment · Fixed by #75162
Closed
Assignees
Labels
A-docs Area: Documentation for any part of the project, including the compiler, standard library, and tools C-bug Category: This is a bug. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.

Comments

@steffahn
Copy link
Member

steffahn commented Aug 1, 2020

https://doc.rust-lang.org/std/keyword.move.html states:

move converts any variables captured by reference or mutable reference to owned by value variables. The three Fn trait's mirror the ways to capture variables, when move is used, the closures [sic] is represented by the FnOnce trait.

The second half of the second sentence is plain wrong and causes confusion.

@rustbot modify labels: T-doc, T-libs, C-enhancement. (Is tagging T-doc still reasonable?)

This issue has been assigned to @poliorcetics via this comment.

@rustbot rustbot added C-enhancement Category: An issue proposing an enhancement or a PR with one. A-docs Area: Documentation for any part of the project, including the compiler, standard library, and tools T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. labels Aug 1, 2020
@jonas-schievink jonas-schievink added C-bug Category: This is a bug. and removed C-enhancement Category: An issue proposing an enhancement or a PR with one. labels Aug 1, 2020
@poliorcetics
Copy link
Contributor

@rustbot claim

(Is tagging T-doc still reasonable?)

Yes, it allows for easy searching of doc issue (at least for me), with label: T-doc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-docs Area: Documentation for any part of the project, including the compiler, standard library, and tools C-bug Category: This is a bug. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants