[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <8ea98456-5ba1-4cb9-8cca-e19142bfbba1@gmail.com>
Date: Sat, 5 Aug 2023 14:04:59 -0300
From: Martin Rodriguez Reboredo <yakoyoku@...il.com>
To: Benno Lossin <benno.lossin@...ton.me>,
Miguel Ojeda <ojeda@...nel.org>,
Wedson Almeida Filho <wedsonaf@...il.com>,
Alex Gaynor <alex.gaynor@...il.com>
Cc: Boqun Feng <boqun.feng@...il.com>, Gary Guo <gary@...yguo.net>,
Björn Roy Baron <bjorn3_gh@...tonmail.com>,
Alice Ryhl <aliceryhl@...gle.com>,
Andreas Hindborg <nmi@...aspace.dk>,
rust-for-linux@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3 02/13] rust: init: make `#[pin_data]` compatible with
conditional compilation of fields
On 7/29/23 06:09, Benno Lossin wrote:
> This patch allows one to write
> ```
> #[pin_data]
> pub struct Foo {
> #[cfg(CONFIG_BAR)]
> a: Bar,
> #[cfg(not(CONFIG_BAR))]
> a: Baz,
> }
> ```
> Before, this would result in a compile error, because `#[pin_data]`
> would generate two functions named `a` for both fields unconditionally.
>
> Signed-off-by: Benno Lossin <benno.lossin@...ton.me>
> ---
> [...]
Reviewed-by: Martin Rodriguez Reboredo <yakoyoku@...il.com>
Powered by blists - more mailing lists