Subject: Re: [net-next PATCH] rust: net: phy: Correct the safety comment for impl Sync

From: Boqun Feng <[email-masked]>
Date: Mon, 11 Dec 2023 15:22:54 -0800

On Mon, Dec 11, 2023 at 10:50:02PM +0100, Alice Ryhl wrote:
> 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 <[email-masked]>
> 
> It's fine if you want to change it,

Does it mean you are OK with the new version in this patch? If so...

> but I think the current safety comment is good enough.

... let's change it since the current version doesn't look good enough
to me as I explained above (it's not wrong, but less straight-forward to
me).

Regards,
Boqun

> Alice