-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Add new lint ptr_cast_constness
#10779
Conversation
r? @llogiq (rustbot has picked a reviewer for you, use r? to override) |
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.
One small nitpick, otherwise this looks good. r=me with the nit fixed. Thank you!
Co-authored-by: llogiq <bogusandre@gmail.com>
Sorry for keeping you waiting. Thank you for writing the lint! @bors r+ |
☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test |
This adds a new lint which functions as the opposite side of the coin to
ptr_as_ptr
. Rather than linting only as casts that don't change constness, this lints only constness; suggesting to usepointer::cast_const
orpointer::cast_mut
instead.changelog: new lint [
ptr_cast_constness
]