## Keyboard shortcuts

Press `←` or `→` to navigate between chapters

Press `S` or `/` to search in the book

Press `?` to show this help

Press `Esc` to hide this help

[type.inferred]

# Inferred type

[type.inferred.syntax]

Syntax
InferredType → _

[type.inferred.intro]

The inferred type asks the compiler to infer the type if possible based on the surrounding information available.

[type.inferred.constraint]

It cannot be used in item signatures.

It is often used in generic arguments:

    #![allow(unused)]
    fn main() {
    let x: Vec<_> = (0..10).collect();
    }