3 #![feature(anonymous_lifetime_in_impl_trait)]
5 // This is understood as `fn foo<'_1>(_: impl Iterator<Item = &'_1 ()>) {}`.
6 fn f(_: impl Iterator<Item = &'_ ()>) {}
8 // But that lifetime does not participate in resolution.
9 fn g(mut x: impl Iterator<Item = &'_ ()>) -> Option<&'_ ()> { x.next() }
10 //~^ ERROR missing lifetime specifier
12 // This is understood as `fn foo<'_1>(_: impl Iterator<Item = &'_1 ()>) {}`.
13 async fn h(_: impl Iterator<Item = &'_ ()>) {}
15 // But that lifetime does not participate in resolution.
16 async fn i(mut x: impl Iterator<Item = &'_ ()>) -> Option<&'_ ()> { x.next() }
17 //~^ ERROR missing lifetime specifier
18 //~| ERROR lifetime may not live long enough