Skip to content

Conversation

@klensy
Copy link
Contributor

@klensy klensy commented Jun 17, 2025

Extend or_fun_call lint with new checks for Option::get_or_insert, Result::map_or.

changelog: [or_fun_call]: lint more methods

@rustbot
Copy link
Collaborator

rustbot commented Jun 17, 2025

r? @samueltardieu

rustbot has assigned @samueltardieu.
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 Jun 17, 2025
@klensy klensy changed the title Or fun call up or_fun_call: lint more methods Jun 17, 2025
Copy link
Member

@samueltardieu samueltardieu left a comment

Choose a reason for hiding this comment

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

You applied the dogfood by hand, right? You missed two placed (clippy_lints/src/matches/redundant_pattern_match.rs line 276 and lintcheck/src/output.rs line 80).

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action from the author. (Use `@rustbot ready` to update this status) and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties labels Jun 17, 2025
@klensy
Copy link
Contributor Author

klensy commented Jun 17, 2025

You applied the dogfood by hand, right?

No, skipped ones didn't look as good suggestions to me.

@klensy
Copy link
Contributor Author

klensy commented Jun 17, 2025

@rustbot ready

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties and removed S-waiting-on-author Status: This is awaiting some action from the author. (Use `@rustbot ready` to update this status) labels Jun 17, 2025
@samueltardieu samueltardieu added the L-nursery Lint: Currently in the nursery group label Jun 19, 2025
@klensy klensy requested a review from samueltardieu June 20, 2025 10:21
Copy link
Member

@samueltardieu samueltardieu left a comment

Choose a reason for hiding this comment

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

Can you squash the commits (except for the dogfood one)?

@samueltardieu
Copy link
Member

@rustbot author

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action from the author. (Use `@rustbot ready` to update this status) and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties labels Jun 20, 2025
@rustbot
Copy link
Collaborator

rustbot commented Jun 20, 2025

Reminder, once the PR becomes ready for a review, use @rustbot ready.

@klensy
Copy link
Contributor Author

klensy commented Jun 20, 2025

@rustbot ready

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties and removed S-waiting-on-author Status: This is awaiting some action from the author. (Use `@rustbot ready` to update this status) labels Jun 20, 2025
@samueltardieu
Copy link
Member

Thanks.

@samueltardieu samueltardieu added this pull request to the merge queue Jun 21, 2025
Merged via the queue into rust-lang:master with commit 7c828e6 Jun 21, 2025
11 checks passed
github-merge-queue bot pushed a commit that referenced this pull request Jul 6, 2025
<strike>build on top of #15071</strike>

This also adds ability to lint Option/Result::and method. Yes, this is
not `or` method, but uses the same eager/lazy linting logic. Should i
update lint description to list all checked structs/methods?

changelog: [`or_fun_call`]: lint Option/Result::and
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

L-nursery Lint: Currently in the nursery group 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.

3 participants