Skip to content

non_snake_case lint does not fire on argument names in fn pointers #140089

Closed as duplicate of#33995
@theemathas

Description

@theemathas

I tried this code:

pub fn foo() {
    let _: fn(CamelCase: i32);
}

I expected rust to warn with the non_snake_case lint, due to the camel case argument. Instead, the code compiles without warnings.

See also #140088

Meta

Issue reproduces on the playground with version 1.88.0-nightly (2025-04-07 e643f59f6da3a84f43e7)

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions