Skip to content

Conversation

@alt440
Copy link

@alt440 alt440 commented Dec 25, 2025

Please write a short comment explaining your change (or "none" for internal only changes)
Fixes #16110
changelog: [similar_names] : Changed the lint docs to reflect its actual behavior

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Dec 25, 2025
@rustbot
Copy link
Collaborator

rustbot commented Dec 25, 2025

r? @Jarcho

rustbot has assigned @Jarcho.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot

This comment has been minimized.

@github-actions
Copy link

github-actions bot commented Dec 25, 2025

No changes for 65c8e18

@Jarcho
Copy link
Contributor

Jarcho commented Jan 6, 2026

Given the fallout from this change it's probably better to change the example instead. cc @rust-lang/clippy

@alt440
Copy link
Author

alt440 commented Jan 7, 2026

@Jarcho If we do follow this route, the documentation would have to change to specify that the similar_names lint only considers variables with same length and similar characters.

Note that the change is bigger than just the similar_names lint file because of the dogfood tests. If it wasn't for that, the change is minor: see my first commit.

@Jarcho
Copy link
Contributor

Jarcho commented Jan 8, 2026

It just doesn't handle insertions at the start or end of the name. Single character insertions in the middle still trigger the lint.

Note that the change is bigger than just the similar_names lint file because of the dogfood tests. If it wasn't for that, the change is minor: see my first commit.

That's exactly what I mean by the fallout. A large number of the new lint emissions are quite questionable.

@rustbot

This comment has been minimized.

@rustbot

This comment has been minimized.

@alt440 alt440 force-pushed the similar_names_16110 branch from 756c081 to ef6d4c1 Compare January 30, 2026 03:08
@rustbot

This comment has been minimized.

@alt440
Copy link
Author

alt440 commented Jan 30, 2026

Hey @Jarcho ,

I've reverted the fix. I added some unit tests and changed the docs.

Let me know if that's OK with you

@alt440 alt440 force-pushed the similar_names_16110 branch from 1900269 to 4faf0ad Compare January 30, 2026 03:32
@rustbot

This comment has been minimized.

@alt440 alt440 force-pushed the similar_names_16110 branch from 4faf0ad to 65c8e18 Compare January 30, 2026 03:33
@rustbot
Copy link
Collaborator

rustbot commented Jan 30, 2026

This PR was rebased onto a different master commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-review Status: Awaiting review from the assignee but also interested parties

Projects

None yet

Development

Successfully merging this pull request may close these issues.

similar_names not triggered by example

3 participants