Skip to content

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

Merged
bors merged 1 commit into
rust-lang:masterfrom
Luv-Ray:non_canonical_partial_ord_impl
Apr 24, 2024
Merged

[non_canonical_partial_ord_impl]: Fix emitting warnings which conflict with needless_return#12702
bors merged 1 commit into
rust-lang:masterfrom
Luv-Ray:non_canonical_partial_ord_impl

Conversation

@Luv-Ray

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

Copy link
Copy Markdown
Contributor

fixes #12683


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

@rustbot

rustbot commented Apr 22, 2024

Copy link
Copy Markdown
Collaborator

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
Comment thread clippy_lints/src/non_canonical_impls.rs Outdated
kind: ExprKind::Ret(Some(Expr { kind: ret_kind, .. })),
..
}) = stmt.kind
&& let ExprKind::Call(

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Member

@bors r+

thanks!!

@bors

bors commented Apr 24, 2024

Copy link
Copy Markdown
Contributor

📌 Commit 107e44b has been approved by Manishearth

It is now in the queue for this repository.

@bors

bors commented Apr 24, 2024

Copy link
Copy Markdown
Contributor

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

@bors

bors commented Apr 24, 2024

Copy link
Copy Markdown
Contributor

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

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