Skip to content
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

add parentheses to [let_and_return]'s suggestion #12842

Merged
merged 1 commit into from
May 27, 2024

Conversation

J-ZhengLi
Copy link
Member

@J-ZhengLi J-ZhengLi commented May 24, 2024

closes: #12801


changelog: suggest adding parentheses when linting [let_and_return] and [needless_return]

@rustbot
Copy link
Collaborator

rustbot commented May 24, 2024

r? @y21

rustbot has assigned @y21.
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 May 24, 2024
clippy_utils/src/lib.rs Outdated Show resolved Hide resolved
Copy link
Member

@y21 y21 left a comment

Choose a reason for hiding this comment

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

lgtm, very nice improvement

@@ -1038,14 +1040,8 @@ fn report<'tcx>(
);
},
State::ExplicitDeref { mutability } => {
if matches!(
Copy link
Member

Choose a reason for hiding this comment

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

cool to see that this function is useful in other lints too

@y21
Copy link
Member

y21 commented May 27, 2024

thanks! @bors r+

@bors
Copy link
Collaborator

bors commented May 27, 2024

📌 Commit 03306b6 has been approved by y21

It is now in the queue for this repository.

@bors
Copy link
Collaborator

bors commented May 27, 2024

⌛ Testing commit 03306b6 with merge 722de3b...

@bors
Copy link
Collaborator

bors commented May 27, 2024

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: y21
Pushing 722de3b to master...

@bors bors merged commit 722de3b into rust-lang:master May 27, 2024
5 checks passed
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
4 participants