Re: [PATCH v5 1/4] rust: sync: change `<Arc<T> as ForeignOwnable>::PointedTo` to `T`
From: Miguel Ojeda
Date: Thu Feb 27 2025 - 11:35:07 EST
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.
Cheers,
Miguel