summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorMalte Wechter <maltewechter@gmail.com>2026-06-03 16:20:51 +0200
committerTamir Duberstein <tamird@gmail.com>2026-10-06 13:58:27 -0700
commit0024f3311f6f54f10dc778802da3fea0522ade66 (patch)
tree4cfca620584f61b75edb1d0cc0bba71414789d70 /scripts
parent69f80fef3153299d9c72c53d1d71eef6354b6926 (diff)
downloadlinux-next-0024f3311f6f54f10dc778802da3fea0522ade66.tar.gz
linux-next-0024f3311f6f54f10dc778802da3fea0522ade66.zip
scripts: generate_rust_analyzer.py: pass cfg to macros crate
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. [ Tamir: reworded subject in keeping with convention. ] Fixes: 36174d16f3ec ("rust: kunit: support KUnit-mapped `assert!` macros in `#[test]`s") Signed-off-by: Malte Wechter <maltewechter@gmail.com> Link: https://patch.msgid.link/20260603-rust-analyzer-macro-v3-1-9f7fdb4908e5@gmail.com Signed-off-by: Tamir Duberstein <tamird@kernel.org>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/generate_rust_analyzer.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/scripts/generate_rust_analyzer.py b/scripts/generate_rust_analyzer.py
index dc1219736f77..621895bae128 100755
--- a/scripts/generate_rust_analyzer.py
+++ b/scripts/generate_rust_analyzer.py
@@ -250,6 +250,7 @@ def generate_crates(
"macros",
srctree / "rust" / "macros" / "lib.rs",
[std, proc_macro, proc_macro2, quote, syn],
+ cfg=generated_cfg,
)
zerocopy_derive = append_proc_macro_crate(