Re: [PATCH v3 02/10] rust: list: add ListArc
From: Miguel Ojeda
Date: Tue Aug 06 2024 - 10:14:27 EST
On Wed, Jul 31, 2024 at 6:47 PM Benno Lossin <benno.lossin@xxxxxxxxx> wrote:
>
> Can we start using `feature(derive_smart_pointer)` on new enough
> compiler versions? (I guess you probably want it as a separate patch
> series to avoid delaying this in case it needs anything [eg the new
> build system])
> Do we need any Makefile modifications for that or could we just do
> `#[cfg_attr(compiler-is-new-enough, derive(SmartPointer))` on the struct
> and then cfg these impls away? (and what would "compiler-is-new-enough"
> be?)
That is possible with the upcoming `RUSTC_VERSION`: you can have
Kconfig symbol for a particular version/feature/etc. Please see the
upcoming lints series for an example in the docs for that.
Cheers,
Miguel