False positive by redundant_closure to remove a closure that is required for lifetime reasons #7497
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
Lint name:
redundant_closure
I tried this code:
This is a minimized version from real code inside of diesel. See this playground for an interactive version.
This results in the following output:
I expected to see this happen: No warning or a suggestion that won't cause a compiler error after applying.
Instead, this happened: Clippy suggested to remove the map closure in every trait implementation. This results in a compiler error (See this playground for a changed version)
Meta
cargo clippy -V
:0.1.55 (2021-07-26 08095fc)
rustc -Vv
:The text was updated successfully, but these errors were encountered: