[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CANiq72nFu2vX7vOWtjutj8574Jy2eGvj87ryhhY_PxFHWSOh+A@mail.gmail.com>
Date: Wed, 26 Nov 2025 00:57:33 +0100
From: Miguel Ojeda <miguel.ojeda.sandonis@...il.com>
To: Jesung Yang <y.j3ms.n@...il.com>
Cc: Miguel Ojeda <ojeda@...nel.org>, Boqun Feng <boqun.feng@...il.com>, Gary Guo <gary@...yguo.net>,
Björn Roy Baron <bjorn3_gh@...tonmail.com>,
Benno Lossin <lossin@...nel.org>, Andreas Hindborg <a.hindborg@...nel.org>,
Alice Ryhl <aliceryhl@...gle.com>, Trevor Gross <tmgross@...ch.edu>,
Danilo Krummrich <dakr@...nel.org>, rust-for-linux@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] rust: syn: make rust-analyzer treat `std` as a dependency
On Tue, Nov 25, 2025 at 10:38 AM Jesung Yang <y.j3ms.n@...il.com> wrote:
>
> Fix the `generate_rust_analyzer.py` script to ensure that the
> `rust-project.json` it produces includes `std` in the `deps` field for
> the `syn` crate.
>
> `syn` directly references items from `std`, so rust-analyzer should
> treat it as a dependency to provide correct IDE support.
>
> For example, `syn::Punctuated` contains fields of type `Vec<..>` and
> `Option<..>`, both of which come from the standard library prelude.
> With `std` listed in the `deps` field, rust-analyzer can infer the types
> of these fields instead of showing `{unknown}`.
>
> Verified the explicit uses of `std` using:
>
> grep -rn 'std::' rust/syn/
>
> Fixes: 737401751ace ("rust: syn: enable support in kbuild")
> Signed-off-by: Jesung Yang <y.j3ms.n@...il.com>
For something like this I am tempted to rebase, but given you took the
effort to write a nice commit message, I can apply them.
Let's see if someone else can confirm this works for them and gives a tag.
Thanks!
Cheers,
Miguel
Powered by blists - more mailing lists