@@ -41,7 +41,7 @@ LL + async fn i(mut x: impl Iterator<Item = &()>) -> Option<()> { x.next() }
41
41
|
42
42
43
43
error[E0106]: missing lifetime specifier
44
- --> $DIR/impl-trait-missing-lifetime-gated.rs:28 :58
44
+ --> $DIR/impl-trait-missing-lifetime-gated.rs:27 :58
45
45
|
46
46
LL | fn g(mut x: impl Iterator<Item = &'_ ()>) -> Option<&'_ ()> { x.next() }
47
47
| ^^ expected named lifetime parameter
@@ -64,7 +64,7 @@ LL + fn g(mut x: impl Iterator<Item = &'_ ()>) -> Option<()> { x.next() }
64
64
|
65
65
66
66
error[E0106]: missing lifetime specifier
67
- --> $DIR/impl-trait-missing-lifetime-gated.rs:38 :64
67
+ --> $DIR/impl-trait-missing-lifetime-gated.rs:37 :64
68
68
|
69
69
LL | async fn i(mut x: impl Iterator<Item = &'_ ()>) -> Option<&'_ ()> { x.next() }
70
70
| ^^ expected named lifetime parameter
@@ -87,7 +87,7 @@ LL + async fn i(mut x: impl Iterator<Item = &'_ ()>) -> Option<()> { x.next(
87
87
|
88
88
89
89
error[E0106]: missing lifetime specifier
90
- --> $DIR/impl-trait-missing-lifetime-gated.rs:49 :37
90
+ --> $DIR/impl-trait-missing-lifetime-gated.rs:47 :37
91
91
|
92
92
LL | fn g(mut x: impl Foo) -> Option<&()> { x.next() }
93
93
| ^ expected named lifetime parameter
@@ -108,7 +108,7 @@ LL + fn g(mut x: impl Foo) -> Option<()> { x.next() }
108
108
|
109
109
110
110
error[E0106]: missing lifetime specifier
111
- --> $DIR/impl-trait-missing-lifetime-gated.rs:60 :41
111
+ --> $DIR/impl-trait-missing-lifetime-gated.rs:58 :41
112
112
|
113
113
LL | fn g(mut x: impl Foo<()>) -> Option<&()> { x.next() }
114
114
| ^ expected named lifetime parameter
@@ -129,7 +129,7 @@ LL + fn g(mut x: impl Foo<()>) -> Option<()> { x.next() }
129
129
|
130
130
131
131
warning: elided lifetime has a name
132
- --> $DIR/impl-trait-missing-lifetime-gated.rs:66 :57
132
+ --> $DIR/impl-trait-missing-lifetime-gated.rs:64 :57
133
133
|
134
134
LL | fn resolved_anonymous<'a, T: 'a>(f: impl Fn(&'a str) -> &T) {
135
135
| -- lifetime `'a` declared here ^ this elided lifetime gets resolved as `'a`
@@ -162,16 +162,8 @@ help: consider introducing a named lifetime parameter
162
162
LL | fn g<'a>(mut x: impl Iterator<Item = &'a ()>) -> Option<&()> { x.next() }
163
163
| ++++ ++
164
164
165
- error: lifetime may not live long enough
166
- --> $DIR/impl-trait-missing-lifetime-gated.rs:19:67
167
- |
168
- LL | async fn i(mut x: impl Iterator<Item = &()>) -> Option<&()> { x.next() }
169
- | ----------------------------------------------------------- ^^^^^^^^ returning this value requires that `'1` must outlive `'static`
170
- | |
171
- | return type `impl Future<Output = Option<&'static ()>>` contains a lifetime `'1`
172
-
173
165
error[E0658]: anonymous lifetimes in `impl Trait` are unstable
174
- --> $DIR/impl-trait-missing-lifetime-gated.rs:25 :35
166
+ --> $DIR/impl-trait-missing-lifetime-gated.rs:24 :35
175
167
|
176
168
LL | fn f(_: impl Iterator<Item = &'_ ()>) {}
177
169
| ^^ expected named lifetime parameter
@@ -185,7 +177,7 @@ LL + fn f<'a>(_: impl Iterator<Item = &'a ()>) {}
185
177
|
186
178
187
179
error[E0658]: anonymous lifetimes in `impl Trait` are unstable
188
- --> $DIR/impl-trait-missing-lifetime-gated.rs:28 :39
180
+ --> $DIR/impl-trait-missing-lifetime-gated.rs:27 :39
189
181
|
190
182
LL | fn g(mut x: impl Iterator<Item = &'_ ()>) -> Option<&'_ ()> { x.next() }
191
183
| ^^ expected named lifetime parameter
@@ -198,16 +190,8 @@ LL - fn g(mut x: impl Iterator<Item = &'_ ()>) -> Option<&'_ ()> { x.next()
198
190
LL + fn g<'a>(mut x: impl Iterator<Item = &'a ()>) -> Option<&'_ ()> { x.next() }
199
191
|
200
192
201
- error: lifetime may not live long enough
202
- --> $DIR/impl-trait-missing-lifetime-gated.rs:38:73
203
- |
204
- LL | async fn i(mut x: impl Iterator<Item = &'_ ()>) -> Option<&'_ ()> { x.next() }
205
- | ----------------------------------------------------------------- ^^^^^^^^ returning this value requires that `'1` must outlive `'static`
206
- | |
207
- | return type `impl Future<Output = Option<&'static ()>>` contains a lifetime `'1`
208
-
209
193
error[E0658]: anonymous lifetimes in `impl Trait` are unstable
210
- --> $DIR/impl-trait-missing-lifetime-gated.rs:46 :18
194
+ --> $DIR/impl-trait-missing-lifetime-gated.rs:44 :18
211
195
|
212
196
LL | fn f(_: impl Foo) {}
213
197
| ^^^ expected named lifetime parameter
@@ -220,7 +204,7 @@ LL | fn f<'a>(_: impl Foo<'a>) {}
220
204
| ++++ ++++
221
205
222
206
error[E0658]: anonymous lifetimes in `impl Trait` are unstable
223
- --> $DIR/impl-trait-missing-lifetime-gated.rs:49 :22
207
+ --> $DIR/impl-trait-missing-lifetime-gated.rs:47 :22
224
208
|
225
209
LL | fn g(mut x: impl Foo) -> Option<&()> { x.next() }
226
210
| ^^^ expected named lifetime parameter
@@ -233,7 +217,7 @@ LL | fn g<'a>(mut x: impl Foo<'a>) -> Option<&()> { x.next() }
233
217
| ++++ ++++
234
218
235
219
error[E0658]: anonymous lifetimes in `impl Trait` are unstable
236
- --> $DIR/impl-trait-missing-lifetime-gated.rs:57 :22
220
+ --> $DIR/impl-trait-missing-lifetime-gated.rs:55 :22
237
221
|
238
222
LL | fn f(_: impl Foo<()>) {}
239
223
| ^ expected named lifetime parameter
@@ -246,7 +230,7 @@ LL | fn f<'a>(_: impl Foo<'a, ()>) {}
246
230
| ++++ +++
247
231
248
232
error[E0658]: anonymous lifetimes in `impl Trait` are unstable
249
- --> $DIR/impl-trait-missing-lifetime-gated.rs:60 :26
233
+ --> $DIR/impl-trait-missing-lifetime-gated.rs:58 :26
250
234
|
251
235
LL | fn g(mut x: impl Foo<()>) -> Option<&()> { x.next() }
252
236
| ^ expected named lifetime parameter
@@ -258,7 +242,7 @@ help: consider introducing a named lifetime parameter
258
242
LL | fn g<'a>(mut x: impl Foo<'a, ()>) -> Option<&()> { x.next() }
259
243
| ++++ +++
260
244
261
- error: aborting due to 16 previous errors; 1 warning emitted
245
+ error: aborting due to 14 previous errors; 1 warning emitted
262
246
263
247
Some errors have detailed explanations: E0106, E0658.
264
248
For more information about an error, try `rustc --explain E0106`.
0 commit comments