[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aOebOPvpi1sYKOuM@google.com>
Date: Thu, 9 Oct 2025 11:23:36 +0000
From: Alice Ryhl <aliceryhl@...gle.com>
To: Markus Probst <markus.probst@...teo.de>
Cc: Lee Jones <lee@...nel.org>, Pavel Machek <pavel@...nel.org>, Danilo Krummrich <dakr@...nel.org>,
Miguel Ojeda <ojeda@...nel.org>, Alex Gaynor <alex.gaynor@...il.com>,
Igor Korotin <igor.korotin.linux@...il.com>, Lorenzo Stoakes <lorenzo.stoakes@...cle.com>,
Vlastimil Babka <vbabka@...e.cz>, "Liam R. Howlett" <Liam.Howlett@...cle.com>,
Uladzislau Rezki <urezki@...il.com>, Boqun Feng <boqun.feng@...il.com>, Gary Guo <gary@...yguo.net>,
bjorn3_gh@...tonmail.com, Benno Lossin <lossin@...nel.org>,
Andreas Hindborg <a.hindborg@...nel.org>, Trevor Gross <tmgross@...ch.edu>,
Daniel Almeida <daniel.almeida@...labora.com>, linux-leds@...r.kernel.org,
rust-for-linux@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/4] rust: add pinned wrapper of Vec
On Wed, Oct 08, 2025 at 06:10:45PM +0000, Markus Probst wrote:
> Implement a wrapper of Vec that guarantees that its content will never be
> moved, unless the item implements Unpin, allowing PinInit to be
> initialized on the Vec.
> +/// A pinned wrapper of the [`Vec`] type.
> +///
> +/// It is guaranteed that the contents will never be moved, unless T implements Unpin.
> +pub struct PinnedVec<T, A: Allocator>(Vec<T, A>);
Could we simply use `Pin<Vec<T>>` for this purpose? Why the new struct?
In fact, does the utility added by commit ac9eea3d08c2 ("rust: alloc:
implement Box::pin_slice()") not satisfy your needs?
Also, this thread seems mangled. Patches 2, 3, and 4 should all be
replies to patch 1. Right now the thread is deeply nested.
Alice
Powered by blists - more mailing lists