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
Metadata
Assignees
Labels
No labels
Activity
steveklabnik commentedon Aug 21, 2014
The manual should have this, but I don't want to add it to the Guide.
steveklabnik commentedon Nov 25, 2014
I want to do this, but I'm not sure where it fits in the Reference...
Mention type placeholders in the book.
Auto merge of rust-lang#12891 - brennanvincent:expander_stack, r=lnicola
Auto merge of rust-lang#12891 - paultag:paultag/fix-lint-description,…