needless_lifetimes wrongly detect elidable lifetime with Iterator #11291
Labels
C-bug
Category: Clippy is not doing the correct thing
I-suggestion-causes-error
Issue: The suggestions provided by this Lint cause an ICE/error when applied
Summary
Clippy wrongly detect a lifetime which could be elided.
Lint Name
needless_lifetimes
Reproducer
I tried this code:
I saw this happen:
I expected to see this happen:
Lifetime
'a
cannot be elided. Clippy should not emit a warning.Version
The text was updated successfully, but these errors were encountered: