Re: [PATCH v2 2/8] rust: add offset_of! macro

From: Alice Ryhl
Date: Wed Jun 07 2023 - 11:15:28 EST


Andreas Hindborg (Samsung) <nmi@xxxxxxxxxxxx> writes:
> Alice Ryhl <aliceryhl@xxxxxxxxxx> writes:
>> +#[macro_export]
>> +macro_rules! offset_of {
>> + ($type:path, $field:ident) => {{
>
> Could we add a descriptive comment?
>
> // Prevent deref coersion to `$field` by requiring `$type`
> // has a field named `$field`
>
> BR Andreas

Sure. It will be in the next version of the patchset.

Alice