Skip to content

fix option-if-let-else lint #15394

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 3, 2025
Merged

Conversation

zihan0822
Copy link
Contributor

@zihan0822 zihan0822 commented Aug 2, 2025

some simple twists
Fixes #15002
Fixes #15379

changelog: [option_if_let_else]: Don't remove raw pointer derefs in suggestions
changelog: [option_if_let_else]: Don't suggest passing argless functions to Result::map_or_else

@rustbot
Copy link
Collaborator

rustbot commented Aug 2, 2025

r? @Jarcho

rustbot has assigned @Jarcho.
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 2, 2025
Copy link

github-actions bot commented Aug 2, 2025

Lintcheck changes for 8f6b43d

Lint Added Removed Changed
clippy::option_if_let_else 0 0 4

This comment will be updated if you push new changes

@rustbot rustbot added S-blocked Status: marked as blocked ❌ on something else such as an RFC or other implementation work A-lint Area: New lints and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties labels Aug 2, 2025
…inter

closes rust-clippy/issues/15379

Signed-off-by: Zihan <[email protected]>
@zihan0822 zihan0822 force-pushed the option-if-let-else-fix branch from 310a8b9 to cf33eda Compare August 2, 2025 17:08
@zihan0822
Copy link
Contributor Author

@rustbot label -A-lint

@rustbot rustbot removed the A-lint Area: New lints label Aug 2, 2025
@zihan0822
Copy link
Contributor Author

@rustbot label -S-blocked +S-waiting-on-review

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties and removed S-blocked Status: marked as blocked ❌ on something else such as an RFC or other implementation work labels Aug 2, 2025
…map_or_else

closes rust-clippy/issues/15002

Signed-off-by: Zihan <[email protected]>
@zihan0822 zihan0822 force-pushed the option-if-let-else-fix branch from cf33eda to 8f6b43d Compare August 2, 2025 20:59
@Jarcho
Copy link
Contributor

Jarcho commented Aug 3, 2025

@rustbot note remove feature-freeze

Not sure why this was tagged.

Copy link
Contributor

@Jarcho Jarcho left a comment

Choose a reason for hiding this comment

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

Thank you.

For the future the changelog: part of the PR description has to be a single line. If there are multiple things to add multiple changelog: lines can be used.

@Jarcho Jarcho added this pull request to the merge queue Aug 3, 2025
Merged via the queue into rust-lang:master with commit 88bcf1c Aug 3, 2025
15 checks passed
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Aug 3, 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.

option-if-let-else: no method named map_or found for raw pointer *const std::option::Option<i32> option-if-let-else botches map_or_else fn call
3 participants