Re: [RFC PATCH 1/5] doc: rust: create safety standard
From: Miguel Ojeda
Date: Wed Jul 24 2024 - 17:20:47 EST
On Wed, Jul 24, 2024 at 10:32 PM Benno Lossin <benno.lossin@xxxxxxxxx> wrote:
>
> There are also several clippy lints [1] that we could start using:
> - missing_safety_doc
> - multiple_unsafe_ops_per_block
> - undocumented_unsafe_blocks
> - unnecessary_safety_comment
> - unnecessary_safety_doc
>
> I personally think we should enable all of them.
We briefly talked about it today -- others agreed on going ahead with
something like the diff I sent the other day, so I will send a formal
patch -- it has been a while since we wanted to do this (long enough
that we were the ones requesting one of those lints, and it got
implemented since then... :)
And we can keep the `TODO`s as "good first issue"s (I already updated
some days ago our good first issue about it:
https://github.com/Rust-for-Linux/linux/issues/351).
We can also enable the others easily, most are essentially clean
already anyway, so I will send that as well.
The only one that may be more "annoying" is
`multiple_unsafe_ops_per_block`. On the other hand, it could in fact
force people to think about every "bullet point" of the requirements
(the lint highlights nicely the different operations).
Cheers,
Miguel