Skip to content

as_pointer_underscore: don't lint when casting fn item pointers #15418

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

zihan0822
Copy link
Contributor

@zihan0822 zihan0822 commented Aug 5, 2025

The pointer to fn item can not be explicitly expressed with syntax. We should avoid trying to recover from _ in that case.
Fixes: #15281

changelog: [as_pointer_underscore]: don't lint when casting fn item pointers

@rustbot
Copy link
Collaborator

rustbot commented Aug 5, 2025

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

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Aug 5, 2025
The pointer to fn item can not be explicitly expressed with syntax. We
should avoid trying to recover from `_` in that case.

changelog: [`as_pointer_underscore`]: don't lint when casting fn item pointers

Signed-off-by: Zihan <[email protected]>
@zihan0822 zihan0822 force-pushed the fix-as-pointer-underscore branch from 6e3f3e5 to a53cbdc Compare August 5, 2025 17:47
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.

as-pointer-underscore suggests *const fn() -> u32 {foo}
3 participants