What is turbofish syntax

Turbofish syntax is the ::<> notation in Rust used to explicitly define generic type parameters when the compiler cannot infer them.

Turbofish syntax is the ::<Type> notation used in Rust to explicitly specify generic type parameters when calling a function or method. It is named for the shape of the symbol ::<> and is required when the compiler cannot infer the types automatically.

let v = Vec::<i32>::new();
let result: Result<i32, _> = "42".parse::<i32>();
let x = Some::<String>("hello".to_string());