[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CANiq72k_1tmXF+bTAeDfMYz=DOcEwsaS6v3d6NLjLPF-+7hwDA@mail.gmail.com>
Date: Fri, 28 Feb 2025 14:17:37 +0100
From: Miguel Ojeda <miguel.ojeda.sandonis@...il.com>
To: Andreas Hindborg <a.hindborg@...nel.org>
Cc: Oliver Mangold <oliver.mangold@...me>, linux-kernel@...r.kernel.org,
rust-for-linux@...r.kernel.org
Subject: Re: [PATCH] Rust: Implement a unique reference type URef
supplementing ARef
On Fri, Feb 28, 2025 at 12:11 PM Andreas Hindborg <a.hindborg@...nel.org> wrote:
>
> When the trait is unsafe, we need to specify the conditions under which
> it is safe to implement:
>
> # Safety
>
> - Requirement 1
> - Requirement 2
> - etc
>
> See `AlwaysRefCounted` for reference on formatting.
I think should be caught by Clippy -- Oliver, please try building with
`CLIPPY=1` (we would like Clippy-clean builds as much as reasonably
possible), you should be getting something like:
error: docs for unsafe trait missing `# Safety` section
--> rust/........rs:23:1
|
23 | pub unsafe trait A {}
| ^^^^^^^^^^^^^^^^^^
|
= help: for further information visit
https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc
= note: `-D clippy::missing-safety-doc` implied by `-D warnings`
= help: to override `-D warnings` add
`#[allow(clippy::missing_safety_doc)]`
Thanks!
Cheers,
Miguel
Powered by blists - more mailing lists