Re: [PATCH 16/19] Documentation: rust: add coding guidelines on lints

From: Alice Ryhl
Date: Thu Sep 05 2024 - 04:19:29 EST


On Wed, Sep 4, 2024 at 10:45 PM Miguel Ojeda <ojeda@xxxxxxxxxx> wrote:
>
> In the C side, disabling diagnostics locally, i.e. within the source code,
> is rare (at least in the kernel). Sometimes warnings are manipulated
> via the flags at the translation unit level, but that is about it.
>
> In Rust, it is easier to change locally the "level" of lints
> (e.g. allowing them locally). In turn, this means it is easier to
> globally enable more lints that may trigger a few false positives here
> and there that need to be allowed ocally, but that generally can spot
> issues or bugs.
>
> Thus document this.
>
> Signed-off-by: Miguel Ojeda <ojeda@xxxxxxxxxx>

Wow, does C really not have an easier way to do it?

Reviewed-by: Alice Ryhl <aliceryhl@xxxxxxxxxx>