Skip to content

Justification needed for fn_to_numeric_cast #2980

Closed
@dtolnay

Description

@dtolnay

https://rust-lang-nursery.github.io/rust-clippy/v0.0.212/index.html#fn_to_numeric_cast

What it does

Checks for casts of a function pointer to a numeric type except usize.

Why is this bad

Casting a function pointer to something other than usize is not a good style.

Justifying a style lint by calling it not good style is not a justification. I know "style" lints can be more difficult to justify than lints that catch what are almost certain to be bugs, but I looked through the "Why is this bad" section of all 81 other style lints present in Clippy 0.0.212 and I believe every other style lint is adequately justified.

I don't disagree with this lint, but by itself this explanation is not something I can point someone to and have them understand why I am asking them to change their code.

Mentioning @VKlayd who worked on this lint in #2814.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-documentationArea: Adding or improving documentationgood first issueThese issues are a good way to get started with Clippy

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions