//@ edition:2021 #![feature(anonymous_lifetime_in_impl_trait)] // This is understood as `fn foo<'_1>(_: impl Iterator) {}`. fn f(_: impl Iterator) {} // But that lifetime does not participate in resolution. fn g(mut x: impl Iterator) -> Option<&'_ ()> { x.next() } //~^ ERROR missing lifetime specifier //~| ERROR lifetime may not live long enough // This is understood as `fn foo<'_1>(_: impl Iterator) {}`. async fn h(_: impl Iterator) {} // But that lifetime does not participate in resolution. async fn i(mut x: impl Iterator) -> Option<&'_ ()> { x.next() } //~^ ERROR missing lifetime specifier //~| ERROR lifetime may not live long enough fn main() {}