Re: [PATCH v2] rust-analyzer: update generate_rust_analyzer to pass cfg to macros crate
From: Tamir Duberstein
Date: Wed Jun 03 2026 - 10:02:14 EST
On Wed, May 20, 2026 at 3:47 AM Malte Wechter <maltewechter@xxxxxxxxx> wrote:
>
> The configuration passed to rust-analyzer for the `macros` create is
> different from the configuration used to build the crate. Update
> rust-analyzer configuration for the `macros` crate to reflect the
> settings used to compile the crate. Without this change, rust-analyzer
> does not understand conditional compilation gated by configuration
> redicates based on the `CONFIG_*`configuration values in the macros
> crate.
>
> Signed-off-by: Malte Wechter <maltewechter@xxxxxxxxx>
> ---
> We are currently moving the 'configfs_attrs' macro to a procedual implementation,
> with this we wanted to gate the macro on CONFIG_CONFIGFS_FS, since the macros crate is
> build with these configurations since 36174d16 ("rust: kunit: support KUnit-mapped `assert!` macros in `#[test]`s").
> It compiles but rust-analyzer does not reflect this as adding:
Should this patch have a Fixes tag mentioning 36174d16?