Skip to content

Fix false positives in duration_suboptimal_units for small literals#16565

Open
Hectonight wants to merge 3 commits intorust-lang:masterfrom
Hectonight:duration-suboptimal-units-literals
Open

Fix false positives in duration_suboptimal_units for small literals#16565
Hectonight wants to merge 3 commits intorust-lang:masterfrom
Hectonight:duration-suboptimal-units-literals

Conversation

@Hectonight
Copy link
Copy Markdown

@Hectonight Hectonight commented Feb 14, 2026

fixes #16532

changelog: Fix [duration_suboptimal_units] false positive for small integer literals (at most 10).

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Feb 14, 2026
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Feb 14, 2026

r? @llogiq

rustbot has assigned @llogiq.
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

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: 7 candidates
  • 7 candidates expanded to 7 candidates
  • Random selection from Jarcho, dswij, llogiq, samueltardieu

@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Feb 22, 2026

☔ The latest upstream changes (possibly 739f462) made this pull request unmergeable. Please resolve the merge conflicts.

Copy link
Copy Markdown
Contributor

@ada4a ada4a left a comment

Choose a reason for hiding this comment

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

Apparently there was another PR which addressed the same issue: #16596; I personally like its descriptive comments, because they explain not only the what, but also the why -- could you please port them to your PR? Though maybe it would make sense to put them into the lint description, so that they are more easily accessible to the end users, and in the comment above the check itself, just refer the reader to the description.

View changes since this review

@tanndlin
Copy link
Copy Markdown

This PR looks extremely close but forgotten. How can I help get this across the finish line?

@ada4a
Copy link
Copy Markdown
Contributor

ada4a commented Apr 27, 2026

Hello @tanndlin, thank you for your interest:) I think your best bet would be to open a copy of this PR, fix the merge conflicts, and add the comments I've proposed in the comment above; then we can review it:)

@tanndlin
Copy link
Copy Markdown

I have made a PR that combines the code from this one and the comments from #16596

#16922

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.

duration_suboptimal_units should not trigger on small values

5 participants