1 error[E0106]: missing lifetime specifier
2 --> $DIR/impl-trait-missing-lifetime.rs:9:54
4 LL | fn g(mut x: impl Iterator<Item = &'_ ()>) -> Option<&'_ ()> { x.next() }
5 | ^^ expected named lifetime parameter
7 = help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from
8 help: consider using the `'static` lifetime
10 LL | fn g(mut x: impl Iterator<Item = &'_ ()>) -> Option<&'static ()> { x.next() }
13 error[E0106]: missing lifetime specifier
14 --> $DIR/impl-trait-missing-lifetime.rs:16:60
16 LL | async fn i(mut x: impl Iterator<Item = &'_ ()>) -> Option<&'_ ()> { x.next() }
17 | ^^ expected named lifetime parameter
19 = help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from
20 help: consider using the `'static` lifetime
22 LL | async fn i(mut x: impl Iterator<Item = &'_ ()>) -> Option<&'static ()> { x.next() }
25 error: lifetime may not live long enough
26 --> $DIR/impl-trait-missing-lifetime.rs:16:69
28 LL | async fn i(mut x: impl Iterator<Item = &'_ ()>) -> Option<&'_ ()> { x.next() }
29 | -------------- ^^^^^^^^ returning this value requires that `'1` must outlive `'static`
31 | return type `impl Future<Output = Option<&'static ()>>` contains a lifetime `'1`
33 error: aborting due to 3 previous errors
35 For more information about this error, try `rustc --explain E0106`.