Closed
Description
#12764 landed, but didn't include docs for the feature.
The manual and tutorial should mention it in the context of type inference, and give a proper explanation:
_
in a type is a "type placeholder" and has the meaning "infer this type".- Type placeholders are not allowed in item signatures, because global inference is not allowed by design.
- Patterns like
Vec<_>
are called "partial type hints" and are useful in combination with things likecollect()
on iterators.
Metadata
Assignees
Labels
No labels