-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Request: A single lint for any usage at all of as
#4771
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
Comments
Particularly, pointer casts that change from *const T to *mut T or *mut U are almost always wrong. |
Some people told me they do these casts fairly freely as they just don't use mutability on raw poitners as meaning anything. In particular with I'd still welcome both (a) a specific lint for mutability-changing raw ptr casts, and also (b) a general lint against |
myself, for doing that i would turn on the lint and then make designated const functions that have allow attributes. then you have clear names for truncating, signed-ness flipping, and extending |
This lint seems a bit too aggressive for most codebases, does it belong in nursery or in pedantic? |
pedantic for sure |
I'd say it should be in restriction, since it restricts the language. (And is too pedantic even for |
Hello there's currently a few different lints related to the usage of the
as
keyword. I'd like a single lint (allow by default) that just triggers on any usage ofas
at all.The text was updated successfully, but these errors were encountered: