Re: [PATCH] cpufreq: Convert `/// SAFETY` lines to `# Safety` sections

From: Miguel Ojeda
Date: Wed Jun 11 2025 - 07:47:21 EST


On Tue, Jun 10, 2025 at 1:23 PM Viresh Kumar <viresh.kumar@xxxxxxxxxx> wrote:
>
> Replace `/// SAFETY` comments in doc comments with proper `# Safety`
> sections, as per rustdoc conventions.
>
> Also mark the C FFI callbacks as `unsafe` to correctly reflect their
> safety requirements.

+1 I guess the Clippy lint triggered when writing the section, right?

I think it would be nice to have a lint to catch this other case, i.e.
using `// SAFETY`, so opened:

https://github.com/rust-lang/rust-clippy/issues/15033

I also found a possible false negative (or positive, depends) related
to this, so opened:

https://github.com/rust-lang/rust-clippy/issues/15034

Cheers,
Miguel