-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
single_match_else - single expr/stmt else block corner case #5771
Conversation
(rust_highfive has picked a reviewer for you, use r? to override) |
tests/ui/single_match_else.rs
Outdated
// don't lint here | ||
match Some(1) { | ||
Some(a) => println!("${:?}", a), | ||
None => return, | ||
} | ||
|
||
// don't lint here | ||
match Some(1) { | ||
Some(a) => println!("${:?}", a), | ||
None => return, | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this supposed to be the same?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah my bad, this is supposed to be the {return}
case
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know now, forgot to skip rustfmt on those cases.
1ed3582
to
c8c286c
Compare
Thanks, can you please run rustfmt? I see some trailing whitespaces. |
c8c286c
to
dac19e3
Compare
|
That's strange. Thanks! @bors r+ |
📌 Commit dac19e3 has been approved by |
☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test |
One approach to fix #3489.
See discussion in the issue.
changelog: single_match_else - single expr/stmt else block corner case fix