Skip to content

[non_canonical_partial_ord_impl]: Fix emitting warnings which conflict with needless_return #12702

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 1 commit into from
Apr 24, 2024

Conversation

Luv-Ray
Copy link
Contributor

@Luv-Ray Luv-Ray commented Apr 22, 2024

fixes #12683


changelog: fix [non_canonical_partial_ord_impl] emitting warnings which conflict with needless_return

@rustbot
Copy link
Collaborator

rustbot commented Apr 22, 2024

r? @Manishearth

rustbot has assigned @Manishearth.
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 Apr 22, 2024
kind: ExprKind::Ret(Some(Expr { kind: ret_kind, .. })),
..
}) = stmt.kind
&& let ExprKind::Call(
Copy link
Member

Choose a reason for hiding this comment

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

can this code and the previous code be shared somehow? perhaps a factored out "expr_is_cmp" or something

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@Luv-Ray Luv-Ray force-pushed the non_canonical_partial_ord_impl branch from 6784c22 to 107e44b Compare April 24, 2024 02:54
@Manishearth
Copy link
Member

@bors r+

thanks!!

@bors
Copy link
Contributor

bors commented Apr 24, 2024

📌 Commit 107e44b has been approved by Manishearth

It is now in the queue for this repository.

@bors
Copy link
Contributor

bors commented Apr 24, 2024

⌛ Testing commit 107e44b with merge 9162bbf...

@bors
Copy link
Contributor

bors commented Apr 24, 2024

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: Manishearth
Pushing 9162bbf to master...

@bors bors merged commit 9162bbf into rust-lang:master Apr 24, 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
Development

Successfully merging this pull request may close these issues.

Warning emitted for non-canonical implementations conflicts with denying implicit and needless returns
4 participants