[PATCH] rust-analyzer: update generate_rust_analyzer to pass cfg to macros crate
From: Malte Wechter
Date: Fri May 08 2026 - 03:11:55 EST
pass kernel configurations to the macros crate to prevent rust-analyzer
from marking conditionally included macros as 'never included'.
Add the generated configurations to the macros cfg list
so rust-analyzer correctly hints inclusion and exclusion.
Signed-off-by: Malte Wechter <maltewechter@xxxxxxxxx>
---
scripts/generate_rust_analyzer.py | 1 +
1 file changed, 1 insertion(+)
diff --git a/scripts/generate_rust_analyzer.py b/scripts/generate_rust_analyzer.py
index d5f9a0ca742c..69990a96522e 100755
--- a/scripts/generate_rust_analyzer.py
+++ b/scripts/generate_rust_analyzer.py
@@ -238,6 +238,7 @@ def generate_crates(
"macros",
srctree / "rust" / "macros" / "lib.rs",
[std, proc_macro, proc_macro2, quote, syn],
+ cfg=generated_cfg,
)
build_error = append_crate(
---
base-commit: 254f49634ee16a731174d2ae34bc50bd5f45e731
change-id: 20260506-rust-analyzer-macro-22f387f8eff4
Best regards,
--
Malte Wechter <maltewechter@xxxxxxxxx>