[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aMFQL-Hq1KvBG5lh@google.com>
Date: Wed, 10 Sep 2025 10:17:19 +0000
From: Alice Ryhl <aliceryhl@...gle.com>
To: Benno Lossin <lossin@...nel.org>
Cc: Miguel Ojeda <ojeda@...nel.org>, Alex Gaynor <alex.gaynor@...il.com>,
Boqun Feng <boqun.feng@...il.com>, Gary Guo <gary@...yguo.net>,
"Björn Roy Baron" <bjorn3_gh@...tonmail.com>, Andreas Hindborg <a.hindborg@...nel.org>,
Trevor Gross <tmgross@...ch.edu>, Danilo Krummrich <dakr@...nel.org>, Fiona Behrens <me@...enk.dev>,
Alban Kurti <kurti@...icto.ai>, rust-for-linux@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] rust: pin-init: add `#[bind]` attribute to access
previously initialized fields
On Wed, Sep 10, 2025 at 12:07:53PM +0200, Benno Lossin wrote:
> Assigning a field a value in an initializer macro can be marked with the
> `#[bind]` attribute. Doing so creates a `let` binding with the same
> name. This `let` binding has the type `Pin<&mut T>` if the field is
> structurally pinned or `&mut T` otherwise (where `T` is the type of the
> field).
>
> Signed-off-by: Benno Lossin <lossin@...nel.org>
Is there a reason we can't apply this to all fields and avoid the
attribute?
Do we have a place that might be able to use this?
Alice
Powered by blists - more mailing lists