Skip to content

Conversation

@krikera
Copy link
Contributor

@krikera krikera commented Jul 9, 2025

Update manual_is_variant_and documentation to include equality comparison patterns

This commit updates the documentation for the manual_is_variant_and lint to include all linted cases. Previously, the documentation only mentioned the .map(f).unwrap_or_default() pattern, but the lint also catches equality comparison patterns like option.map(f) == Some(true) and result.map(f) == Ok(true).

changelog: [manual_is_variant_and]: Update documentation to include equality comparison patterns

fixes #15217

@rustbot
Copy link
Collaborator

rustbot commented Jul 9, 2025

r? @Alexendoo

rustbot has assigned @Alexendoo.
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 rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Jul 9, 2025
@krikera krikera changed the title Update manual_is_variant_and documentation to include equality compar… Update manual_is_variant_and documentation to include equality comparison Jul 9, 2025
@blyxyas
Copy link
Member

blyxyas commented Jul 11, 2025

Alexendoo's a little bit over the top on capacity (32 assigned PRs)
I'll shave off his last uncommented PRs.

r? @blyxyas

@rustbot rustbot assigned blyxyas and unassigned Alexendoo Jul 11, 2025
Copy link
Member

@blyxyas blyxyas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks! ❤️ Also, great that these will be together in the same stable release (I think that the extension isn't yet on stable, right? I had to use master to test these because the stable Clippy wasn't recognizing. these as lintable)

Could you squash these two commits into one?

@krikera
Copy link
Contributor Author

krikera commented Jul 13, 2025

Sure ! Thanks.

- Add equality pattern support to manual_is_variant_and
- Update documentation and Clippy manual
@blyxyas blyxyas added this pull request to the merge queue Jul 13, 2025
Merged via the queue into rust-lang:master with commit 6f2567d Jul 13, 2025
11 checks passed
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Jul 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

manual_is_variant_and documentation doesn't mention all linted cases

4 participants