Re: [PATCH v5 1/4] rust: sync: change `<Arc<T> as ForeignOwnable>::PointedTo` to `T`
From: Tamir Duberstein
Date: Thu Feb 27 2025 - 11:39:35 EST
On Thu, Feb 27, 2025 at 11:34 AM Miguel Ojeda
<miguel.ojeda.sandonis@xxxxxxxxx> wrote:
>
> On Thu, Feb 27, 2025 at 2:49 PM Tamir Duberstein <tamird@xxxxxxxxx> wrote:
> >
> > Isn't the unsafe bit `*this`, which is what this comment should
> > justify? In Rust 1.82+ `addr_of_mut!` isn't unsafe I believe. Also `x`
> > is likely meant to be `this`.
>
> `addr_of_mut!` could also be called safely in many cases even before
> 1.82, i.e. it depends on the expression (and that is still true in
> 1.82+). The change in that version was about referring to static muts
> and extern statics.
Thanks for explaining! Was I correct about the unsafe operation here
being the dereference?