Closed
Description
This is currently accepted in 2018: https://play.rust-lang.org/?gist=7ba2dee1134f9848b54b7364ea9568aa&version=nightly&edition=2018
trait Foo<'a> {}
impl<'b: '_> Foo<'b> for i32 {}
AFAICT, it desugars to
impl<'b: 'c, 'c> Foo<'b> for i32 {}
So it's "fine", but useless.
It should error, as trying to do this does in other places, such as
struct Foo<'a: '_>(&'a i32);
Tracking issue for the impl_header_lifetime_elision
feature: #15872
On the current beta this gives
error[E0688]: cannot mix in-band and explicit lifetime definitions
so this was at least exposed by #54458