Skip to content

new lint: manual_lowest_one - #17954

Closed
raushan728 wants to merge 1 commit into
rust-lang:mainfrom
raushan728:feat/manual-lowest-one
Closed

raushan728 wants to merge 1 commit into
rust-lang:mainfrom
raushan728:feat/manual-lowest-one

Conversation

@raushan728

@raushan728 raushan728 commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #16986

Adds manual_lowest_one, which suggests x.lowest_one() for if x == 0 { None } else { Some(x.trailing_zeros()) } (and the != 0 / swapped forms).

Only primitive integers are linted, with MSRV 1.97.0.

changelog: new lint: [manual_lowest_one]

@rustbot rustbot added S-waiting-on-community-reviews Status: This is awaiting for positive reviews from the community before a maintainer is assigned. needs-fcp PRs that add, remove, or rename lints and need an FCP S-waiting-on-review Status: Awaiting review from the assignee but also interested parties labels Oct 30, 2026
@rustbot

rustbot commented Oct 30, 2026

Copy link
Copy Markdown
Collaborator

Thanks for the pull request. A reviewer will take a look after it receives 2 community reviews.

In the meantime, we would highly appreciate if you could try to review any of PRs waiting on community reviews.

@rustbot

This comment has been minimized.

@raushan728
raushan728 force-pushed the feat/manual-lowest-one branch from bebf36a to 527043b Compare November 5, 2026 12:49
@rustbot

rustbot commented Nov 5, 2026

Copy link
Copy Markdown
Collaborator

This PR was rebased onto a different main 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.

@oli-obk

oli-obk commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

@oli-obk oli-obk closed this Nov 9, 2026
@rustbot rustbot removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties S-waiting-on-community-reviews Status: This is awaiting for positive reviews from the community before a maintainer is assigned. labels Nov 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-fcp PRs that add, remove, or rename lints and need an FCP

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Lint suggestion: manual_lowest_one

3 participants