Skip to content

Conversation

@kyoto7250
Copy link
Contributor

@kyoto7250 kyoto7250 commented Aug 8, 2024

close #13191
This PR fixes the false positives in unnecessary_min_or_max .
We should use is_diagnostic_item for checking def_ids in this lint.


changelog: fix false positive in unnecessary_min_or_max .

@rustbot
Copy link
Collaborator

rustbot commented Aug 8, 2024

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

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Aug 8, 2024
@kyoto7250 kyoto7250 changed the title add paths of min and max and check using match_def_path Use is_diagnostic_item for checking a def_id in unnecessary_min_or_max. Aug 8, 2024
@kyoto7250 kyoto7250 marked this pull request as ready for review August 8, 2024 15:59
@llogiq
Copy link
Contributor

llogiq commented Aug 26, 2024

Looks good to me. Thank you for this improvement.

@bors r+

@bors
Copy link
Contributor

bors commented Aug 26, 2024

📌 Commit c2ed04b has been approved by llogiq

It is now in the queue for this repository.

@bors
Copy link
Contributor

bors commented Aug 26, 2024

⌛ Testing commit c2ed04b with merge 09f71de...

bors added a commit that referenced this pull request Aug 26, 2024
Use `is_diagnostic_item` for checking a def_id in `unnecessary_min_or_max`.

close #13191
This PR fixes the false positives in `unnecessary_min_or_max `.
We should use `is_diagnostic_item` for checking def_ids in this lint.

----

changelog:
fix false positive in `unnecessary_min_or_max `
@bors
Copy link
Contributor

bors commented Aug 26, 2024

💔 Test failed - checks-action_test

@llogiq
Copy link
Contributor

llogiq commented Aug 26, 2024

@bors retry

@bors
Copy link
Contributor

bors commented Aug 26, 2024

⌛ Testing commit c2ed04b with merge 4f1b227...

bors added a commit that referenced this pull request Aug 26, 2024
Use `is_diagnostic_item` for checking a def_id in `unnecessary_min_or_max`.

close #13191
This PR fixes the false positives in `unnecessary_min_or_max `.
We should use `is_diagnostic_item` for checking def_ids in this lint.

----

changelog:
fix false positive in `unnecessary_min_or_max `
@bors
Copy link
Contributor

bors commented Aug 26, 2024

💔 Test failed - checks-action_test

@kyoto7250
Copy link
Contributor Author

kyoto7250 commented Aug 28, 2024

@llogiq
When I checked the regular expression for the failed job, it seems that line breaks should not be included when specifying changelog. I have fixed the PR description. Could you please try the job again?

https://github.com/rust-lang/rust-clippy/actions/runs/10568283502/job/29278932177

@y21
Copy link
Member

y21 commented Aug 28, 2024

@bors retry

@bors
Copy link
Contributor

bors commented Aug 28, 2024

⌛ Testing commit c2ed04b with merge 04bded5...

@bors
Copy link
Contributor

bors commented Aug 28, 2024

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: llogiq
Pushing 04bded5 to master...

@bors bors merged commit 04bded5 into rust-lang:master Aug 28, 2024
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.

false positive when using a function called min on an unsigned integer type, when the function doesn't return a minimum (e.g. in a builder pattern)

5 participants