[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c833e8c5-0787-45e6-a069-2874104fa8a7@ryhl.io>
Date: Mon, 11 Dec 2023 22:50:02 +0100
From: Alice Ryhl <alice@...l.io>
To: Boqun Feng <boqun.feng@...il.com>, netdev@...r.kernel.org
Cc: rust-for-linux@...r.kernel.org, andrew@...n.ch, tmgross@...ch.edu,
miguel.ojeda.sandonis@...il.com, benno.lossin@...ton.me, wedsonaf@...il.com,
aliceryhl@...gle.com, FUJITA Tomonori <fujita.tomonori@...il.com>
Subject: Re: [net-next PATCH] rust: net: phy: Correct the safety comment for
impl Sync
On 12/11/23 20:49, Boqun Feng wrote:
> The current safety comment for impl Sync for DriverVTable has two
> problem:
>
> * the correctness is unclear, since all types impl Any[1], therefore all
> types have a `&self` method (Any::type_id).
>
> * it doesn't explain why useless of immutable references can ensure the
> safety.
>
> Fix this by rewritting the comment.
>
> [1]: https://doc.rust-lang.org/std/any/trait.Any.html
>
> Signed-off-by: Boqun Feng <boqun.feng@...il.com>
It's fine if you want to change it, but I think the current safety
comment is good enough.
Alice
Powered by blists - more mailing lists