-
Notifications
You must be signed in to change notification settings - Fork 445
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
Enable clippy lint borrow_as_ptr
#1152
Comments
Note that this lint is MSRV-aware. Because This kind of thing will continue to bite us as long as we use unstable features because the MSRV infrastructure in clippy is not |
That is a bit annoying... Thanks for noticing it :) Do you know what the advantages of having a msrv in
Since they can't change the current behavior from 1.78-1.85, it won't help us at the moment... |
I imagine the intent is that you get more uniform behavior regardless of the rustc version you happen to be using.
True. |
The justification was on f0915ac ("rust: give Clippy the minimum supported Rust version"), which mentioned the disadvantage -- if we are losing too much we care about, then we could comment it for the time being and then re-enable it e.g. when we bump to the new MSRV.
If it worked, then I guess it wouldn't be too bad to have those Clippy lints only working on the newer ones -- we would be in a similar situation like an existing lint catching more cases in a new release, if I understand correctly. Sadly, 1.85 will likely be the next Debian one. Even if it wasn't, eventually there will be enough developers using only distro versions and thus not seeing all lints anyway, whatever the reason behind it. So we will have to deal with situations like this and do asynchronous cleanups (we already had to, in fact). Anyway, this is all assuming Clippy would give us something to say "we actually use this particular feature across all our supported versions". |
Filed it. rust-lang/rust-clippy#14477 |
Thanks! Added a couple notes there and linked back. |
Clean the tree for any errors that would occur and then enable the clippy lint
borrow_as_ptr
.This requires submitting a proper patch to the LKML and the Rust for Linux mailing list. Please recall to test your changes (including generating the documentation if changed, running the Rust doctests if changed, etc.), to use a proper title for the commit, to sign your commit under the Developer's Certificate of Origin and to add a
Suggested-by:
tag, and aLink:
tag to this issue. Please see https://docs.kernel.org/process/submitting-patches.html and https://rust-for-linux.com/contributing for details."Please take this issue only if you are new to the kernel development process and you would like to use it as a test to submit your first patch to the kernel. Please do not take it if you do not plan to make other contributions to the kernel.
The text was updated successfully, but these errors were encountered: