1 error[E0277]: a value of type `i32` cannot be made by summing an iterator over elements of type `&()`
4 LL | vec![(), ()].iter().sum::<i32>();
5 | ^^^ value of type `i32` cannot be made by summing a `std::iter::Iterator<Item=&()>`
7 = help: the trait `Sum<&()>` is not implemented for `i32`
8 = help: the following other types implement trait `Sum<A>`:
11 note: the method call chain might not have had the expected associated types
14 LL | vec![(), ()].iter().sum::<i32>();
15 | ------------ ^^^^^^ `Iterator::Item` is `&()` here
17 | this expression has type `Vec<()>`
18 note: required by a bound in `std::iter::Iterator::sum`
19 --> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
21 error[E0277]: a value of type `i32` cannot be made by multiplying all elements of type `&()` from an iterator
24 LL | vec![(), ()].iter().product::<i32>();
25 | ^^^^^^^ value of type `i32` cannot be made by multiplying all elements from a `std::iter::Iterator<Item=&()>`
27 = help: the trait `Product<&()>` is not implemented for `i32`
28 = help: the following other types implement trait `Product<A>`:
29 <i32 as Product<&'a i32>>
31 note: the method call chain might not have had the expected associated types
34 LL | vec![(), ()].iter().product::<i32>();
35 | ------------ ^^^^^^ `Iterator::Item` is `&()` here
37 | this expression has type `Vec<()>`
38 note: required by a bound in `std::iter::Iterator::product`
39 --> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
41 error: aborting due to 2 previous errors
43 For more information about this error, try `rustc --explain E0277`.