You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Allow both explicit and elided lifetimes in the same impl header
While still prohibiting explicit and in-band in the same header.
Fixesrust-lang#54456
As usual, I don't know the broader context of the code I'm changing, so please let me know whatever I can do better.
Pre-existing test that mixing explicit and in-band remains an error: https://github.com/rust-lang/rust/blob/master/src/test/ui/in-band-lifetimes/E0688.rs
https://play.rust-lang.org/?gist=63df9129c4f3d2c76f2620acc38d0e57&version=nightly&edition=2018
The
fn
elision is totally fine, but the translation to an impl header givesThis 1) shouldn't be an error, and 2) shouldn't mention "in-band lifetime"s even if it is.
cc
impl_header_lifetime_elision
tracking issue, #15872(This feature is on-by-default in 2018, but not yet stable in 2015.)
The text was updated successfully, but these errors were encountered: