iter_on_empty_collections
's suggestion causes a compilation error
#12807
Labels
C-bug
Category: Clippy is not doing the correct thing
I-false-positive
Issue: The lint was triggered on code it shouldn't have
Summary
The lint
clippy::iter_on_empty_collections
suggests to change[].iter()
tostd::iter::empty()
even when the[].iter()
is used as a fallback value for an iterator over a slice.Lint Name
iter_on_empty_collections
Reproducer
I tried this code:
I saw this happen:
I expected to see this happen: nothing
Version
Additional Labels
No response
The text was updated successfully, but these errors were encountered: