Inferred type
Syntax
InferredType → _
The inferred type asks the compiler to infer the type if possible based on the surrounding information available.
Example
The inferred type is often used in generic arguments:
#![allow(unused)] fn main() { let x: Vec<_> = (0..10).collect(); }
The inferred type cannot be used in item signatures.