@@ -15,12 +15,12 @@ note: the method call chain might not have had the expected associated types
1515LL | let scores = vec![(0, 0)]
1616 | ------------ this expression has type `Vec<({integer}, {integer})>`
1717LL | .iter()
18- | ^^^^^^ associated type `std::iter::Iterator::Item` is `&({integer}, {integer})` here
18+ | ^^^^^^ `std::iter::Iterator::Item` is `&({integer}, {integer})` here
1919LL | .map(|(a, b)| {
2020 | __________^
2121LL | | a + b;
2222LL | | });
23- | |__________^ associated type `std::iter::Iterator::Item` changed to `()` here
23+ | |__________^ `std::iter::Iterator::Item` changed to `()` here
2424note: required by a bound in `std::iter::Iterator::sum`
2525 --> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
2626 |
@@ -50,19 +50,19 @@ note: the method call chain might not have had the expected associated types
5050LL | vec![0, 1]
5151 | ---------- this expression has type `Vec<{integer}>`
5252LL | .iter()
53- | ^^^^^^ associated type `std::iter::Iterator::Item` is `&{integer}` here
53+ | ^^^^^^ `std::iter::Iterator::Item` is `&{integer}` here
5454LL | .map(|x| x * 2)
55- | ^^^^^^^^^^^^^^ associated type `std::iter::Iterator::Item` changed to `{integer}` here
55+ | ^^^^^^^^^^^^^^ `std::iter::Iterator::Item` changed to `{integer}` here
5656LL | .map(|x| x as f64)
57- | ^^^^^^^^^^^^^^^^^ associated type `std::iter::Iterator::Item` changed to `f64` here
57+ | ^^^^^^^^^^^^^^^^^ `std::iter::Iterator::Item` changed to `f64` here
5858LL | .map(|x| x as i64)
59- | ^^^^^^^^^^^^^^^^^ associated type `std::iter::Iterator::Item` changed to `i64` here
59+ | ^^^^^^^^^^^^^^^^^ `std::iter::Iterator::Item` changed to `i64` here
6060LL | .filter(|x| *x > 0)
6161 | ------------------
6262LL | .map(|x| { x + 1 })
6363 | ------------------
6464LL | .map(|x| { x; })
65- | ^^^^^^^^^^^^^^^ associated type `std::iter::Iterator::Item` changed to `()` here
65+ | ^^^^^^^^^^^^^^^ `std::iter::Iterator::Item` changed to `()` here
6666note: required by a bound in `std::iter::Iterator::sum`
6767 --> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
6868 |
@@ -84,9 +84,9 @@ note: the method call chain might not have had the expected associated types
8484 --> $DIR/invalid-iterator-chain.rs:20:31
8585 |
8686LL | println!("{}", vec![0, 1].iter().map(|x| { x; }).sum::<i32>());
87- | ---------- ^^^^^^ ^^^^^^^^^^^^^^^ associated type `std::iter::Iterator::Item` changed to `()` here
87+ | ---------- ^^^^^^ ^^^^^^^^^^^^^^^ `std::iter::Iterator::Item` changed to `()` here
8888 | | |
89- | | associated type `std::iter::Iterator::Item` is `&{integer}` here
89+ | | `std::iter::Iterator::Item` is `&{integer}` here
9090 | this expression has type `Vec<{integer}>`
9191note: required by a bound in `std::iter::Iterator::sum`
9292 --> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
@@ -109,7 +109,7 @@ note: the method call chain might not have had the expected associated types
109109 --> $DIR/invalid-iterator-chain.rs:21:33
110110 |
111111LL | println!("{}", vec![(), ()].iter().sum::<i32>());
112- | ------------ ^^^^^^ associated type `std::iter::Iterator::Item` is `&()` here
112+ | ------------ ^^^^^^ `std::iter::Iterator::Item` is `&()` here
113113 | |
114114 | this expression has type `Vec<()>`
115115note: required by a bound in `std::iter::Iterator::sum`
@@ -134,7 +134,7 @@ note: the method call chain might not have had the expected associated types
134134LL | let a = vec![0];
135135 | ------- this expression has type `Vec<{integer}>`
136136LL | let b = a.into_iter();
137- | ^^^^^^^^^^^ associated type `std::iter::Iterator::Item` is `{integer}` here
137+ | ^^^^^^^^^^^ `std::iter::Iterator::Item` is `{integer}` here
138138LL | let c = b.map(|x| x + 1);
139139 | --------------
140140LL | let d = c.filter(|x| *x > 10 );
@@ -143,7 +143,7 @@ LL | let e = d.map(|x| {
143143 | _______________^
144144LL | | x + 1;
145145LL | | });
146- | |______^ associated type `std::iter::Iterator::Item` changed to `()` here
146+ | |______^ `std::iter::Iterator::Item` changed to `()` here
147147LL | let f = e.filter(|_| false);
148148 | -----------------
149149note: required by a bound in `collect`
0 commit comments