Messages in this thread | | | Date | Wed, 7 Jun 2023 15:15:18 +0000 | Subject | Re: [PATCH v2 2/8] rust: add offset_of! macro | From | Alice Ryhl <> |
| |
Andreas Hindborg (Samsung) <nmi@metaspace.dk> writes: > Alice Ryhl <aliceryhl@google.com> 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
| |