fn_to_numeric_cast_any should not warn cast to pointer #12638
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
Docs says "Checks for casts of a function pointer to any integer type", but it actually warns cast to pointer too.
It may make sense to have a separate lint that warns against casts to arbitrary types, but I believe it is wrong anyway for a lint that is intended to warn against casts to integers to warn against casts to pointers.
Lint Name
fn_to_numeric_cast_any
Reproducer
I tried this code:
I saw this happen:
I expected to see this happen: no warning
playground
Version
Additional Labels
No response
The text was updated successfully, but these errors were encountered: