Conversation

ada4a

just makes the code a bit more concise

changelog: none

@rustbot

r? @Alexendoo

rustbot has assigned @Alexendoo.
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

@rustbotrustbot added the S-waiting-on-reviewStatus: Awaiting review from the assignee but also interested partieslabel Jun 20, 2025
@@ -59,9 +59,8 @@ fn get_const_name_and_ty_name(

pub(super) fn check(cx: &LateContext<'_>, expr: &Expr<'_>, cast_expr: &Expr<'_>, cast_from: Ty<'_>, cast_to: Ty<'_>) {
// We allow casts from any function type to any function type.
match cast_to.kind() {
ty::FnDef(..) | ty::FnPtr(..) => return,
_ => { /* continue to checks */ },
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Should I add an else branch here to retain this comment? Probably not?

Sign up for free to join this conversation on . Already have an account? Sign in to comment
S-waiting-on-reviewStatus: Awaiting review from the assignee but also interested parties
None yet

Successfully merging this pull request may close these issues.