Clippy reports map with identity function on functions that perform implicit conversion #12043
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
Functions that seem like identity functions, but contain implicit conversions such as
&(A,B) -> (&A, &B)
are warned against, even if they're required for compilation.Example - line 7 cannot be removed, but clippy warns against it.
https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=c27e3a77ebb1c965883045a67a8375b3
Lint Name
map_identity
Reproducer
I tried this code:
I saw this happen:
I expected to see this happen:
no lint.
Version
Additional Labels
No response
The text was updated successfully, but these errors were encountered: