summaryrefslogtreecommitdiffstats
path: root/tests/ui/span/type-annotations-needed-expr.stderr
blob: 65a90318a3c254ba53365d9cbfa36652993c22eb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
error[E0282]: type annotations needed
  --> $DIR/type-annotations-needed-expr.rs:2:39
   |
LL |     let _ = (vec![1,2,3]).into_iter().sum() as f64;
   |                                       ^^^ cannot infer type of the type parameter `S` declared on the method `sum`
   |
help: consider specifying the generic argument
   |
LL |     let _ = (vec![1,2,3]).into_iter().sum::<S>() as f64;
   |                                          +++++

error: aborting due to previous error

For more information about this error, try `rustc --explain E0282`.