@@ -88,58 +88,70 @@ LL ~ let _ = it.next();
88
88
|
89
89
90
90
error: unnecessary map of the identity function
91
- --> tests/ui/map_identity.rs:91:15
91
+ --> tests/ui/map_identity.rs:91:23
92
+ |
93
+ LL | let _ = subindex.0.map(|n| n).next();
94
+ | ^^^^^^^^^^^
95
+ |
96
+ help: remove the call to `map`
97
+ |
98
+ LL ~ let mut subindex = (index.by_ref().take(3), 42);
99
+ LL ~ let _ = subindex.0.next();
100
+ |
101
+
102
+ error: unnecessary map of the identity function
103
+ --> tests/ui/map_identity.rs:97:15
92
104
|
93
105
LL | let _ = it.map(|x| x).next();
94
106
| ^^^^^^^^^^^ help: remove the call to `map`
95
107
96
108
error: unnecessary map of the identity function
97
- --> tests/ui/map_identity.rs:96 :19
109
+ --> tests/ui/map_identity.rs:102 :19
98
110
|
99
111
LL | let _ = { it }.map(|x| x).next();
100
112
| ^^^^^^^^^^^ help: remove the call to `map`
101
113
102
114
error: unnecessary map of the identity function
103
- --> tests/ui/map_identity.rs:108 :30
115
+ --> tests/ui/map_identity.rs:114 :30
104
116
|
105
117
LL | let _ = x.iter().copied().map(|[x, y]| [x, y]);
106
118
| ^^^^^^^^^^^^^^^^^^^^^ help: remove the call to `map`
107
119
108
120
error: unnecessary map of the identity function
109
- --> tests/ui/map_identity.rs:134 :26
121
+ --> tests/ui/map_identity.rs:140 :26
110
122
|
111
123
LL | let _ = x.into_iter().map(|Foo { foo, bar }| Foo { foo, bar });
112
124
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove the call to `map`
113
125
114
126
error: unnecessary map of the identity function
115
- --> tests/ui/map_identity.rs:138 :26
127
+ --> tests/ui/map_identity.rs:144 :26
116
128
|
117
129
LL | let _ = x.into_iter().map(|Foo { foo, bar }| foo::Foo { foo, bar });
118
130
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove the call to `map`
119
131
120
132
error: unnecessary map of the identity function
121
- --> tests/ui/map_identity.rs:146 :26
133
+ --> tests/ui/map_identity.rs:152 :26
122
134
|
123
135
LL | let _ = x.into_iter().map(|Foo { foo, bar }| Foo { foo: foo, bar: bar });
124
136
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove the call to `map`
125
137
126
138
error: unnecessary map of the identity function
127
- --> tests/ui/map_identity.rs:150 :26
139
+ --> tests/ui/map_identity.rs:156 :26
128
140
|
129
141
LL | let _ = x.into_iter().map(|Foo { foo, bar }| Foo { bar, foo });
130
142
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove the call to `map`
131
143
132
144
error: unnecessary map of the identity function
133
- --> tests/ui/map_identity.rs:160 :26
145
+ --> tests/ui/map_identity.rs:166 :26
134
146
|
135
147
LL | let _ = x.into_iter().map(|Foo2(foo, bar)| Foo2(foo, bar));
136
148
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove the call to `map`
137
149
138
150
error: unnecessary map of the identity function
139
- --> tests/ui/map_identity.rs:164 :26
151
+ --> tests/ui/map_identity.rs:170 :26
140
152
|
141
153
LL | let _ = x.into_iter().map(|Foo2(foo, bar)| foo::Foo2(foo, bar));
142
154
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove the call to `map`
143
155
144
- error: aborting due to 21 previous errors
156
+ error: aborting due to 22 previous errors
145
157
0 commit comments