]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
scripts: generate_rust_analyzer.py: drop `"is_proc_macro": false`
authorTamir Duberstein <tamird@kernel.org>
Thu, 22 Jan 2026 17:30:46 +0000 (12:30 -0500)
committerTamir Duberstein <tamird@kernel.org>
Mon, 9 Mar 2026 17:20:08 +0000 (13:20 -0400)
commit4079cf049cb265c15c3c7349d85943462ba054d5
treee0292b771bcc2761e671aec6471bbf364889cc2e
parente33d58ee0c081c4468d0ea4f03fcb93c6cb5e21a
scripts: generate_rust_analyzer.py: drop `"is_proc_macro": false`

Add a dedicated `append_proc_macro_crate` function to reduce overloading
in `append_crate`. This has the effect of removing `"is_proc_macro":
false` from the output; this field is interpreted as false if absent[1]
so this doesn't change the behavior of rust-analyzer.

Use the `/` operator on `pathlib.Path` rather than directly crafting a
string. This is consistent with all other path manipulation in this
script.

Link: https://github.com/rust-lang/rust-analyzer/blob/8d01570b5e812a49daa1f08404269f6ea5dd73a1/crates/project-model/src/project_json.rs#L372-L373
Tested-by: Daniel Almeida <daniel.almeida@collabora.com>
Reviewed-by: Daniel Almeida <daniel.almeida@collabora.com>
Reviewed-by: Trevor Gross <tmgross@umich.edu>
Reviewed-by: Jesung Yang <y.j3ms.n@gmail.com>
Tested-by: Jesung Yang <y.j3ms.n@gmail.com>
Link: https://patch.msgid.link/20260122-rust-analyzer-types-v1-2-29cc2e91dcd5@kernel.org
Signed-off-by: Tamir Duberstein <tamird@kernel.org>
scripts/generate_rust_analyzer.py