Re: [PATCH v3 2/2] rust: add dma coherent allocator abstraction.
From: Alice Ryhl
Date: Mon Nov 04 2024 - 04:32:12 EST
On Mon, Nov 4, 2024 at 10:07 AM Abdiel Janulgue
<abdiel.janulgue@xxxxxxxxx> wrote:
> +/// Abstraction of dma_alloc_coherent
> +///
> +/// # Invariants
> +///
> +/// For the lifetime of an instance of CoherentAllocation, the cpu address is a valid pointer
> +/// to an allocated region of consistent memory and we hold a reference to the device.
> +pub struct CoherentAllocation<T: Add> {
Requiring `T: Add` is very unusual. Why?
I don't even see any additions anywhere.
Alice