-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Lint more cases with ptr_eq
#14339
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 more cases with ptr_eq
#14339
Conversation
Also, do not strip conversions of a function pointer to a `*const`, as no implicit conversion will take place.
The `cmp_null` lint is more specialized than `ptr_eq`. The former should take precedence, unless the user allows it.
r? @Manishearth rustbot has assigned @Manishearth. Use |
The merge error seems unrelated:
@Manishearth Could you retry it? |
@samueltardieu Do you have reason to believe it will succeed? That error seems to have popped up in a few places, e.g.:
EDIT: I haven't figured out what wants that particular nightly toolchain or why. |
I don't think simply retrying will work, because this job has been consistently failing with the same error lately. I'm taking a closer look, but I'm still trying to figure out the cause. |
Thanks @lapla-cogito, I am on my phone and did not see that other job failed as well. |
This PR:
ptr_eq
lint only ifcmp_null
doesn't trigger first, as this is a more specialized version!=
in addition to==
The
ptr_eq
code has been moved from underoperators
toptr.rs
, in order to benefit from factorization.Fix #14337
changelog: [
ptr_eq
]: handle more cases