Re: [PATCH 0/8] rust: pin-init: various cleanups to prepare for self-reference

From: Gary Guo

Date: Wed Oct 07 2026 - 09:14:10 EST


On Wed Oct 7, 2026 at 12:20 PM CEST, Benno Lossin wrote:
> On 06 Oct 2026 17:29:30 +0200, Gary Guo <gary@xxxxxxxxxxx> wrote:
>> Pin-init self reference is going to be a big feature, touching various
>> places in pin_data and init macros. Do some various cleanups to tidy up the
>> macro codebase, so the feature can land without much refactoring.
>>
>> Details in commits.
>>
>> Signed-off-by: Gary Guo <gary@xxxxxxxxxxx>
>> ---
>> Gary Guo (8):
>> rust: pin-init: internal: init: forget guards in reverse order
>> rust: pin-init: internal: init: set span location of guards
>> rust: pin-init: internal: add utility to handle generics merging
>> rust: pin-init: internal: add utility for extract a single attribute
>> rust: pin-init: internal: pin_data: move projection struct into `const _: ()` block
>> rust: pin-init: internal: pin_data: extract `#[cfg]` processing to its own function
>> rust: pin-init: internal: pin_data: rename `'__pin` lifetime to `'__this`
>> rust: pin-init: internal: pin_data: parse into `StructInfo` before generating
>>
>> rust/pin-init/internal/src/init.rs | 19 +--
>> rust/pin-init/internal/src/lib.rs | 3 +-
>> rust/pin-init/internal/src/pin_data.rs | 217 +++++++++++++++++++++------------
>> rust/pin-init/internal/src/util.rs | 189 +++++++++++++++++++++++++++-
>> 4 files changed, 341 insertions(+), 87 deletions(-)
>
> these are good improvements. looking forward to seeing the self-ref here!
>
> Acked-by: Benno Lossin <lossin@xxxxxxxxxx>

Thanks, applied to pin-init-next now.

FWIW, Sashiko's suggestion doesn't apply -- unit struct was never supported, and
cfg for generics are not supported either (and not handled by syn's
impl/ty_generics impl).

Best,
Gary