-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New lint for as *const _
and as *mut _
pointer casts
#13251
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
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @Jarcho (or someone else) some time within the next two weeks. Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (
|
89912d7
to
c01402d
Compare
Or maybe we should just make a lint for |
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.
The changes to the borrow_deref_ref
tests should be reverted with the lint being allowed instead.
It's probably fine to lint on just &x as *const _
, nut that would need to be paired with a check on the type required. You can use expr_use_ctxt
to start on that.
Can you please change to using let-chains to match clippy's general style and tone the commenting down a bit. The current comments make the code harder to read.
c01402d
to
2a1a2b1
Compare
as *const _
and as *mut _
pointer casts
Should this lint be enabled by default like
|
Ping @Soveu. If you can just remove the |
a870023
to
1496711
Compare
@Jarcho lets do it |
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.
Thank you.
changelog: New lint for as *const _ and as *mut _ pointer casts
EDIT: lets go with the simpler version