Skip to content

keyword in's doc uses says it requires an Iterator instead of an IntoIterator #74529

Closed
@SkiFire13

Description

@SkiFire13

In the doc for the keyword in it's stated that "The expression immediately following in must implement the Iterator trait."
This is not completly right since it can be followed by anything that implements the IntoIterator trait.
The doc for the keyword for instead correctly cites the IntoIterator trait, althouth it could be improved since it just appears out of thin air when the desugared version is showed, without any prior mentioning.

This issue has been assigned to @Nicholas-Baron via this comment.

Metadata

Metadata

Assignees

Labels

E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions