[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CA+tqQ4L1j=oy87e0DC-m9YA9wJ6fR+PKtVBcnWH9iitNsVqG0A@mail.gmail.com>
Date: Mon, 5 Jan 2026 21:12:37 +0900
From: Jesung Yang <y.j3ms.n@...il.com>
To: Tamir Duberstein <tamird@...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 2/2] rust: quote: make rust-analyzer treat `core` and
`std` as dependencies
On Mon, Jan 5, 2026 at 7:49 PM Tamir Duberstein <tamird@...il.com> wrote:
> On Tue, Nov 25, 2025 at 4: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 `core` and `std` in the `deps`
> > field for the `quote` crate.
> >
> > `quote` directly references items from both `core` and `std`, so
> > rust-analyzer should treat them as dependencies to provide correct IDE
> > support.
> >
> > For example, the `::quote::ToTokens` trait is implemented for
> > `std::ffi::CString`. With `std` listed in the `deps` field,
> > rust-analyzer can show the expected autocomplete for the
> > `::quote::ToTokens` methods on `std::ffi::CString`.
> >
> > Verified the explicit uses of `core` and `std` using:
> >
> > grep -rnE 'core::|std::' rust/quote/
> >
> > Fixes: 88de91cc1ce7 ("rust: quote: enable support in kbuild")
> > Signed-off-by: Jesung Yang <y.j3ms.n@...il.com>
>
> I think quote doesn't need std, see
> https://github.com/dtolnay/quote/pull/318 which removes the last tiny
> usages.
IIUC, to remove `std`, we need to patch our vendored `syn` as well to
not depend on `std`, right? I think it is indeed a desired change.
If you don't mind, I'm happy to patch the vendored `syn` along with
this series if the team agrees. Alternatively, if you'd prefer to send
the patch yourself, please let me know.
Best regards,
Jesung
Powered by blists - more mailing lists