@@ -15,12 +15,12 @@ note: the method call chain might not have had the expected associated types
15
15
LL | let scores = vec![(0, 0)]
16
16
| ------------ this expression has type `Vec<({integer}, {integer})>`
17
17
LL | .iter()
18
- | ^^^^^^ associated type `std::iter::Iterator::Item` is `&({integer}, {integer})` here
18
+ | ^^^^^^ `std::iter::Iterator::Item` is `&({integer}, {integer})` here
19
19
LL | .map(|(a, b)| {
20
20
| __________^
21
21
LL | | a + b;
22
22
LL | | });
23
- | |__________^ associated type `std::iter::Iterator::Item` changed to `()` here
23
+ | |__________^ `std::iter::Iterator::Item` changed to `()` here
24
24
note: required by a bound in `std::iter::Iterator::sum`
25
25
--> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
26
26
|
@@ -50,19 +50,19 @@ note: the method call chain might not have had the expected associated types
50
50
LL | vec![0, 1]
51
51
| ---------- this expression has type `Vec<{integer}>`
52
52
LL | .iter()
53
- | ^^^^^^ associated type `std::iter::Iterator::Item` is `&{integer}` here
53
+ | ^^^^^^ `std::iter::Iterator::Item` is `&{integer}` here
54
54
LL | .map(|x| x * 2)
55
- | ^^^^^^^^^^^^^^ associated type `std::iter::Iterator::Item` changed to `{integer}` here
55
+ | ^^^^^^^^^^^^^^ `std::iter::Iterator::Item` changed to `{integer}` here
56
56
LL | .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
58
58
LL | .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
60
60
LL | .filter(|x| *x > 0)
61
61
| ------------------
62
62
LL | .map(|x| { x + 1 })
63
63
| ------------------
64
64
LL | .map(|x| { x; })
65
- | ^^^^^^^^^^^^^^^ associated type `std::iter::Iterator::Item` changed to `()` here
65
+ | ^^^^^^^^^^^^^^^ `std::iter::Iterator::Item` changed to `()` here
66
66
note: required by a bound in `std::iter::Iterator::sum`
67
67
--> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
68
68
|
@@ -84,9 +84,9 @@ note: the method call chain might not have had the expected associated types
84
84
--> $DIR/invalid-iterator-chain.rs:20:31
85
85
|
86
86
LL | 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
88
88
| | |
89
- | | associated type `std::iter::Iterator::Item` is `&{integer}` here
89
+ | | `std::iter::Iterator::Item` is `&{integer}` here
90
90
| this expression has type `Vec<{integer}>`
91
91
note: required by a bound in `std::iter::Iterator::sum`
92
92
--> $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
109
109
--> $DIR/invalid-iterator-chain.rs:21:33
110
110
|
111
111
LL | println!("{}", vec![(), ()].iter().sum::<i32>());
112
- | ------------ ^^^^^^ associated type `std::iter::Iterator::Item` is `&()` here
112
+ | ------------ ^^^^^^ `std::iter::Iterator::Item` is `&()` here
113
113
| |
114
114
| this expression has type `Vec<()>`
115
115
note: 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
134
134
LL | let a = vec![0];
135
135
| ------- this expression has type `Vec<{integer}>`
136
136
LL | let b = a.into_iter();
137
- | ^^^^^^^^^^^ associated type `std::iter::Iterator::Item` is `{integer}` here
137
+ | ^^^^^^^^^^^ `std::iter::Iterator::Item` is `{integer}` here
138
138
LL | let c = b.map(|x| x + 1);
139
139
| --------------
140
140
LL | let d = c.filter(|x| *x > 10 );
@@ -143,7 +143,7 @@ LL | let e = d.map(|x| {
143
143
| _______________^
144
144
LL | | x + 1;
145
145
LL | | });
146
- | |______^ associated type `std::iter::Iterator::Item` changed to `()` here
146
+ | |______^ `std::iter::Iterator::Item` changed to `()` here
147
147
LL | let f = e.filter(|_| false);
148
148
| -----------------
149
149
note: required by a bound in `collect`
0 commit comments