Re: [PATCH v3 02/10] rust: list: add ListArc

Miguel Ojeda
2024-08-06T14:14:14Z

On Wed, Jul 31, 2024 at 6:47 PM Benno Lossin <benno.lossin@proton.me> 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