Re: [PATCH v4 22/27] rust: auxiliary: generalize Registration over ForLt

From: Eliot Courtney

Date: Mon May 25 2026 - 02:03:59 EST


On Fri May 22, 2026 at 8:34 AM JST, Danilo Krummrich wrote:
> Generalize Registration<T> to Registration<F: ForLt> and
> Device::registration_data<F: ForLt>() to return Pin<&F::Of<'_>>.
>
> The stored 'static lifetime is shortened to the borrow lifetime of &self
> via ForLt::cast_ref; ForLt's covariance guarantee makes this sound.
>
> Signed-off-by: Danilo Krummrich <dakr@xxxxxxxxxx>
> ---

Reviewed-by: Eliot Courtney <ecourtney@xxxxxxxxxx>