7

fix: allow more kinds of if let patterns in guarded return assist by rmehri01 ·...

 11 months ago
source link: https://github.com/rust-lang/rust-analyzer/pull/15698
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Conversation

Contributor

Removes the checks that require the pattern to be a tuple struct with exactly 1 field that is unqualified and has an identifier pattern in it. I'm not sure if there should be more checks in place but they seem unnecessary now?

Closes #15695

rustbot

added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label

Oct 1, 2023

Member

@Veykril Veykril

left a comment

These are indeed unnecessary now that we are emitting let ... else ... here, good catch

rmehri01 reacted with thumbs up emoji

Member

Thanks!
@bors r+

rmehri01 reacted with heart emoji

Collaborator

📌 Commit 146a7cc has been approved by Veykril

It is now in the queue for this repository.

Collaborator

⌛ Testing commit 146a7cc with merge 4c9d2c7...

Collaborator

☀️ Test successful - checks-actions
Approved by: Veykril
Pushing 4c9d2c7 to master...

bors

merged commit 4c9d2c7 into

rust-lang:master

Oct 2, 2023

10 checks passed

rmehri01

deleted the 15695_make_guarded_return_more_lenient branch

October 2, 2023 15:21

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

Veykril

Veykril approved these changes
Assignees

No one assigned

Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Convert to guarded return does not work with many kinds of if let

4 participants

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK