clippy::redundant_closure
: false positive when calling vec![]
#7435
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
Hi!
Here is a minimal example to highlight the issue:
clippy
suggests to update the code with something invalid asVec::new
is not equivalent to|_| vec![]
which takes a parameter.I think this may be related to #3071 but still seems to be a different issue since the
vec![]
macro call appears to be what causes it (there is no problem usingVec::new()
).Meta
cargo clippy -V
: clippy 0.1.53 (53cb7b0 2021-06-17)rustc -Vv
:The text was updated successfully, but these errors were encountered: