Content-Length: 15925 | pFad | https://doc.rust-lang.org/reference/items/../names/../items/../types/inferred.html

Inferred type - The Rust Reference

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

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.









ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: https://doc.rust-lang.org/reference/items/../names/../items/../types/inferred.html

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy