Re: [PATCH 08/12] rust: pin-init: rewrite the initializer macros using `syn`

From: Benno Lossin

Date: Sat Jan 10 2026 - 11:21:37 EST


On Fri Jan 9, 2026 at 6:24 PM CET, Benno Lossin wrote:
> On Fri Jan 9, 2026 at 2:45 PM CET, Gary Guo wrote:
>> On Thu Jan 8, 2026 at 1:50 PM GMT, Benno Lossin wrote:
>>> + zeroed = ::core::mem::zeroed();
>>> + ::core::ptr::write(slot, #path {
>>> + #(
>>> + #fields: ::core::panic!(),
>>> + )*
>>> + ..zeroed
>>
>> Would just ::core::mem::zeroed() here work or does it have same inference issue?
>> IIUC the type inference should work here as ..Default::default() works.
>
> I haven't checked this, will do so.

I checked it (also in the kernel) and it does seem to work, so I'll
change it to your suggestion.

Cheers,
Benno