Re: [PATCH v2 19/20] rust: syn: enable support in kbuild

Jesung Yang
2026-01-05T04:31:51Z

On Mon, Jan 5, 2026 at 8:17 AM Tamir Duberstein <tamird@gmail.com> wrote:
> On Mon, Nov 24, 2025 at 10:25 AM Miguel Ojeda <ojeda@kernel.org> wrote:
[...]
> > diff --git a/scripts/generate_rust_analyzer.py b/scripts/generate_rust_analyzer.py
> > index 4faf153ed2ee..5b6f7b8d6918 100755
> > --- a/scripts/generate_rust_analyzer.py
> > +++ b/scripts/generate_rust_analyzer.py
> > @@ -100,6 +100,13 @@ def generate_crates(srctree, objtree, sysroot_src, external_src, cfgs, core_edit
> > cfg=crates_cfgs["quote"],
> > )
> >
> > + append_crate(
> > + "syn",
> > + srctree / "rust" / "syn" / "lib.rs",
> > + ["proc_macro", "proc_macro2", "quote"],
> > + cfg=crates_cfgs["syn"],
> > + )
>
> I think we need to add "std" here -- without it, navigating to methods
> on e.g. Vec items defined in syn doesn't work (it does work with "std"
> added).

This was handled in [1], but hasn't landed yet, probably due to lack of
Reviewed-by or Tested-by tags. If anyone has a moment to take a look
and provide some tags, it would be appreciated!

[1] https://lore.kernel.org/rust-for-linux/6dbdf6e1c1639ae381ca9ab7041f84728ffa2267.1764062688.git.y.j3ms.n@gmail.com/

Best regards,
Jesung