Skip to content

min_ident_chars applies same rules to variables and fn params #15365

@t-webber

Description

@t-webber

Description

Themin_ident_chars is used on variables, but also on methods. In those methods, by default, if you use the same names in the implementation than in the trait definition, the lint won't warn even if the variable is too short.

It would be a good enhancement to add an option to disable this behaviour, and to lint all the time if the variables are too short, even if they are the same than in the trait definition.

Version

rustc 1.90.0-nightly (498ae9fed 2025-07-28)
binary: rustc
commit-hash: 498ae9fed2e7d90821d70a048f3770f91af08957
commit-date: 2025-07-28
host: x86_64-unknown-linux-gnu
release: 1.90.0-nightly
LLVM version: 20.1.8

Additional Labels

@rustbot label +C-enhancement

Metadata

Metadata

Assignees

Labels

C-enhancementCategory: Enhancement of lints, like adding more cases or adding help messages

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions