Skip to content

Conversation

kiscad
Copy link
Contributor

@kiscad kiscad commented Sep 15, 2023

changelog: [filter_map_bool_then]: Fix the incorrect autofix when the bool in question is a reference.

fix #11503

@rustbot
Copy link
Collaborator

rustbot commented Sep 15, 2023

r? @giraffate

(rustbot has picked a reviewer for you, use r? to override)

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Sep 15, 2023
@giraffate
Copy link
Contributor

@bors r+

Thanks!

@bors
Copy link
Contributor

bors commented Sep 15, 2023

📌 Commit c9b212d has been approved by giraffate

It is now in the queue for this repository.

@bors
Copy link
Contributor

bors commented Sep 15, 2023

⌛ Testing commit c9b212d with merge eaf640d...

@bors
Copy link
Contributor

bors commented Sep 15, 2023

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: giraffate
Pushing eaf640d to master...

@bors bors merged commit eaf640d into rust-lang:master Sep 15, 2023
bors added a commit that referenced this pull request Sep 17, 2023
[`filter_map_bool_then`]: include multiple derefs from adjustments

In #11506 this lint was improved to suggest one deref if the bool is behind references (fixed the FP #11503), however it might need multiple dereferences if the bool is behind multiple layers of references or custom derefs. E.g. `&&&bool` needs `***b`.

changelog: [`filter_map_bool_then`]: suggest as many dereferences as there are needed to get to the bool
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.

filter_map_bool_then generates incorrect autofix when the bool in question is a reference
4 participants