1 The type placeholder `_` was used within a type on an item's signature.
3 Erroneous code example:
6 fn foo() -> _ { 5 } // error
8 static BAR: _ = "test"; // error
11 In those cases, you need to provide the type explicitly:
14 fn foo() -> i32 { 5 } // ok!
16 static BAR: &str = "test"; // ok!
19 The type placeholder `_` can be used outside item's signature as follows:
22 let x = "a4a".split('4')
23 .collect::<Vec<_>>(); // No need to precise the Vec's generic type.