Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
theemathas opened this issue Apr 20, 2025 · 0 comments
Closed

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

theemathas opened this issue Apr 20, 2025 · 0 comments
Labels
C-bug Category: This is a bug.

Comments

@theemathas
Copy link
Contributor

theemathas commented Apr 20, 2025

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)

@theemathas theemathas added the C-bug Category: This is a bug. label Apr 20, 2025
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Apr 20, 2025
@fmease fmease closed this as completed Apr 20, 2025
@fmease fmease reopened this Apr 20, 2025
@fmease fmease closed this as completed Apr 20, 2025
@fmease fmease removed the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Apr 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug.
Projects
None yet
Development

No branches or pull requests

3 participants