-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Lint null function pointers #1644
Comments
I think also (fn_ptr as *const something).is_null() And perhaps suggest I guess we can't lint a bare fn_ptr in a |
I don't see why you want to cast to a |
I don't properly understand the difference between |
Sure, my issue is with the |
Oh, right. Sorry! Yes that. :) I'll edit for clarity. |
I would not transmute (cast is not possible anyway) to Anyway, this is a clear bug-case, so we should not suggest anything, since that will totally depend on the use case and it will be incredibly hard to create a good suggestion. |
rust-lang/rust#40913 showed a real world case of assuming that
fn()
can be null.patterns that should be linted are
The text was updated successfully, but these errors were encountered: