-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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 on fn pointers comparisons in external macros #134536
base: master
Are you sure you want to change the base?
Conversation
r? compiler |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems like it could be more generalized, but fine for now.
Specifically linting in macros seems like a much larger extension of the lint, though. Was this ever discussed by T-lang? |
Though I agree with it in theory. |
Yeah, linting on external macros made me hesitate to put it in the same PR as linting on Anyway, cc @traviscross |
@rustbot labels +I-lang-nominated +T-lang We did talk about the Here are some notes on that unanswered question, from an earlier set of minutes:
|
…er-errors Also lint on option of function pointer comparisons This PR is the first part of rust-lang#134536, ie. the linting on `Option<{fn ptr}>` in the `unpredictable_function_pointer_comparisons` lint, which isn't part of the lang nomination that the second part is going trough, and so should be able to be approved independently. Related to rust-lang#134527 r? `@compiler-errors`
Rollup merge of rust-lang#134586 - Urgau:fn-ptr-lint-option, r=compiler-errors Also lint on option of function pointer comparisons This PR is the first part of rust-lang#134536, ie. the linting on `Option<{fn ptr}>` in the `unpredictable_function_pointer_comparisons` lint, which isn't part of the lang nomination that the second part is going trough, and so should be able to be approved independently. Related to rust-lang#134527 r? `@compiler-errors`
This comment was marked as resolved.
This comment was marked as resolved.
I have extracted the This PR is now only about linting in external macros. |
This PR extends the recently stabilized
unpredictable_function_pointer_comparisons
lintto also lint onas well as linting in external macros (as to catchOption<{function pointer}>
andassert_eq!
and others).Fixes #134527