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
{{ message }}
Repository navigation
Suggestion follow-up for mismatched-lifetime-syntaxes lint #142087
Not a blocker, but just for our consideration (now or in the future), this ordering is going to suggest changing
fnf<'a>(_:&'a()) -> &(){loop{}}
to this
fnf<'a>(_:&'a()) -> &'a(){loop{}}
which then clippy is going to immediately lint on in favor of this:
fnf(_:&()) -> &(){loop{}}
In that case, it does seem like it would be better for rustc to suggest eliding the lifetime. Of course, the harder case looks like this:
fnf<'a>(&'aself, _:&()) -> &(){loop{}}
There, maybe we could still justify making the elision to
fnf(&self, _:&()) -> &(){loop{}}
since that is, after all, the language choice we made about how these elisions should work for methods, and probably if I were to annotate a lifetime here, I'd annotate the other one, but I could see the case for not removing the name here.
Activity
shepmaster commentedon Jul 16, 2025
We've drastically reworded the lint in #143914, so I'm going to mark this issue as overcome-by-events.