[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230607151518.1191562-1-aliceryhl@google.com>
Date: Wed, 7 Jun 2023 15:15:18 +0000
From: Alice Ryhl <aliceryhl@...gle.com>
To: nmi@...aspace.dk
Cc: alex.gaynor@...il.com, aliceryhl@...gle.com,
benno.lossin@...ton.me, bjorn3_gh@...tonmail.com,
boqun.feng@...il.com, gary@...yguo.net, jiangshanlai@...il.com,
linux-kernel@...r.kernel.org, ojeda@...nel.org,
patches@...ts.linux.dev, rust-for-linux@...r.kernel.org,
tj@...nel.org, walmeida@...rosoft.com, wedsonaf@...il.com,
yakoyoku@...il.com
Subject: Re: [PATCH v2 2/8] rust: add offset_of! macro
Andreas Hindborg (Samsung) <nmi@...aspace.dk> writes:
> Alice Ryhl <aliceryhl@...gle.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
Powered by blists - more mailing lists