Skip to content

On identifier not found, detect swapped words #66968

Closed
@estebank

Description

@estebank

On identifiers that have more than one word, it is relatively common to write them in the wrong order (foo_bar_bazfoo_baz_bar). These are normally not found by Levenshtein distance checks, but we could do a basic "split on _, sort and join before comparison" so that we could suggest the right identifier.

This issue has been assigned to @cjkenn via this comment.

Metadata

Metadata

Assignees

Labels

A-diagnosticsArea: Messages for errors, warnings, and lintsA-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.A-suggestion-diagnosticsArea: Suggestions generated by the compiler applied by `cargo fix`C-enhancementCategory: An issue proposing an enhancement or a PR with one.D-papercutDiagnostics: An error or lint that needs small tweaks.E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.P-lowLow priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions