Re: [PATCH v3 21/27] samples: rust: rust_driver_pci: use HRT lifetime for Bar

From: Eliot Courtney

Date: Tue May 19 2026 - 02:47:50 EST


On Sun May 17, 2026 at 9:01 AM JST, Danilo Krummrich wrote:
> Convert the sample driver to SampleDriver<'bound>, taking advantage of
> the lifetime-parameterized Driver trait.
>
> The driver struct holds &'bound pci::Device directly instead of
> ARef<pci::Device>, and pci::Bar<'bound> directly instead of
> Devres<pci::Bar>. This removes PinnedDrop, pin_init_scope, and runtime
> revocation checks on BAR access.
>
> Signed-off-by: Danilo Krummrich <dakr@xxxxxxxxxx>
> ---

Reviewed-by: Eliot Courtney <ecourtney@xxxxxxxxxx>