-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-type-systemArea: Type systemArea: Type systemT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
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());
^~~~~
Metadata
Metadata
Assignees
Labels
A-type-systemArea: Type systemArea: Type systemT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.