1 error[E0277]: a value of type `f32` cannot be made by summing an iterator over elements of type `{integer}`
2 --> $DIR/invalid-iterator-chain-with-int-infer.rs:2:41
4 LL | let x = Some(()).iter().map(|()| 1).sum::<f32>();
5 | ^^^ value of type `f32` cannot be made by summing a `std::iter::Iterator<Item={integer}>`
7 = help: the trait `Sum<{integer}>` is not implemented for `f32`
8 = help: the following other types implement trait `Sum<A>`:
11 note: the method call chain might not have had the expected associated types
12 --> $DIR/invalid-iterator-chain-with-int-infer.rs:2:29
14 LL | let x = Some(()).iter().map(|()| 1).sum::<f32>();
15 | -------- ------ ^^^^^^^^^^^ `Iterator::Item` changed to `{integer}` here
17 | | `Iterator::Item` is `&()` here
18 | this expression has type `Option<()>`
19 note: required by a bound in `std::iter::Iterator::sum`
20 --> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
22 error: aborting due to previous error
24 For more information about this error, try `rustc --explain E0277`.