You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
= help: the following other types implement trait `Sum<A>`:
47
45
<i32 as Sum<&'a i32>>
48
46
<i32 as Sum>
49
-
note: the expression is of type `Map<Map<Filter<Map<Map<Map<std::slice::Iter<'_, {integer}>, [closure@$DIR/invalid-iterator-chain.rs:12:18: 12:21]>, [closure@$DIR/invalid-iterator-chain.rs:13:18: 13:21]>, [closure@$DIR/invalid-iterator-chain.rs:14:18: 14:21]>, [closure@$DIR/invalid-iterator-chain.rs:15:21: 15:24]>, [closure@$DIR/invalid-iterator-chain.rs:16:18: 16:21]>, [closure@$DIR/invalid-iterator-chain.rs:17:18: 17:21]>`
50
-
--> $DIR/invalid-iterator-chain.rs:17:14
47
+
note: the method call chain might not have had the expected associated types
48
+
--> $DIR/invalid-iterator-chain.rs:11:14
51
49
|
52
50
LL | vec![0, 1]
53
51
| ---------- this expression has type `Vec<{integer}>`
54
52
LL | .iter()
55
-
| ------ associated type `std::iter::Iterator::Item` is `&{integer}` here
53
+
| ^^^^^^ associated type `std::iter::Iterator::Item` is `&{integer}` here
56
54
LL | .map(|x| x * 2)
57
-
| -------------- associated type `std::iter::Iterator::Item` is `{integer}` here
55
+
| ^^^^^^^^^^^^^^ associated type `std::iter::Iterator::Item` changed to `{integer}` here
58
56
LL | .map(|x| x as f64)
59
-
| ----------------- associated type `std::iter::Iterator::Item` is `f64` here
57
+
| ^^^^^^^^^^^^^^^^^ associated type `std::iter::Iterator::Item` changed to `f64` here
60
58
LL | .map(|x| x as i64)
61
-
| ----------------- associated type `std::iter::Iterator::Item` is `i64` here
59
+
| ^^^^^^^^^^^^^^^^^ associated type `std::iter::Iterator::Item` changed to `i64` here
62
60
LL | .filter(|x| *x > 0)
63
-
| ------------------ associated type `std::iter::Iterator::Item` is `i64` here
61
+
| ------------------
64
62
LL | .map(|x| { x + 1 })
65
-
| ------------------ associated type `std::iter::Iterator::Item` is `i64` here
63
+
| ------------------
66
64
LL | .map(|x| { x; })
67
-
| ^^^^^^^^^^^^^^^ associated type `std::iter::Iterator::Item` is `()` here
65
+
| ^^^^^^^^^^^^^^^ associated type `std::iter::Iterator::Item` changed to `()` here
68
66
note: required by a bound in `std::iter::Iterator::sum`
0 commit comments