Re: [PATCH] rust: types: improve `ForeignOwnable` documentation

From: Alice Ryhl
Date: Wed Jul 31 2024 - 04:41:53 EST


On Tue, Jul 30, 2024 at 8:23 PM Benno Lossin <benno.lossin@xxxxxxxxx> wrote:
>
> There are no guarantees for the pointer returned by `into_foreign`.
> This is simply because there is no safety documentation stating any
> guarantees. Therefore dereferencing and all other operations for that
> pointer are not allowed in a general context (i.e. when the concrete
> type implementing the trait is not known).
> This might be confusing, therefore add normal documentation to state
> that there are no guarantees given for the pointer.
>
> Signed-off-by: Benno Lossin <benno.lossin@xxxxxxxxx>

Reviewed-by: Alice Ryhl <aliceryhl@xxxxxxxxxx>