Closed
Description
The following used to work (around the time where AdditiveIterator
still existed):
fn main() {
let content = vec!["a","aa","aaa","aaaa"];
let lens = content.iter().map(|x| x.len());
println!("{}", lens.sum());
}
The error message:
<anon>:4:25: 4:30 error: unable to infer enough type information about `_`; type annotations required [E0282]
<anon>:4 println!("{}", lens.sum());
^~~~~