Consider the following code (or run it in rust playground here): fn main() { let a:Vec = vec![1, 2, 3]; let doubled = a.iter().map(|&x| x * 2).collect(); assert_eq!(vec![2, 4, 6], doubled); } If you ran it in the playground linked above, you will see the following compiler error. error[E0282]: type annotations needed –> src/main.rs:4:9 | […]