Skip to content

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

Closed
@steffahn

Description

@steffahn

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.

Metadata

Metadata

Assignees

Labels

A-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsC-bugCategory: This is a bug.T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions