Re: [PATCH v2] rust: Implement the smart pointer `InPlaceInit` for `Arc`

From: Valentin Obst
Date: Wed Jul 24 2024 - 10:20:14 EST


[snip]

> @@ -1112,11 +1113,15 @@ unsafe fn __pinned_init(self, slot: *mut T) -> Result<(), E> {
>
> /// Smart pointer that can initialize memory in-place.
> pub trait InPlaceInit<T>: Sized {
> + /// A type might be pinned implicitly. An addtional `Pin<ImplicitlyPinned>` is useless. In
> + /// doubt, the type can just be set to `Pin<Self>`.
> + type PinnedResult;
> +

[snip]

nit: Typo 's/addtional/additional'

Apart from that, I think "When in doubt, ..." or "If in doubt, ..." are
more common choices than "In doubt, ...". But that's a question of style so
feel free to ignore this comment.

Rest looks good to me.

Best
Valentin