Re: [PATCH 6/7] rust: sync: introduce `UniqueArc`
From: Gary Guo
Date: Sat Dec 31 2022 - 14:47:11 EST
On Tue, 27 Dec 2022 23:19:52 -0800
Laine Taffin Altman <alexanderaltman@xxxxxx> wrote:
> > +impl<T: ?Sized> From<UniqueArc<T>> for Pin<UniqueArc<T>> {
> > + fn from(obj: UniqueArc<T>) -> Self {
> > + // SAFETY: It is not possible to move/replace `T` inside a `Pin<UniqueArc<T>>` (unless `T`
>
> Minor nit: `Pin<UniqueArc<T>>` in this comment should just be `UniqueArc<T>`.
No, the current comment is correct. It's possible to move `T` inside
`UniqueArc<T>` (because it implements `DerefMut`).
Best,
Gary Guo