lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJ-ks9nWbu53Fhmz0Wcb4jHxwr3D-sc=BqW=gHLjw34dAxRKYQ@mail.gmail.com>
Date: Mon, 5 Jan 2026 05:48:22 -0500
From: Tamir Duberstein <tamird@...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 2/2] rust: quote: make rust-analyzer treat `core` and
 `std` as dependencies

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.

> ---
> Unlike [PATCH 1/2], this change doesn't seem to offer a noticeable
> benefit at the moment, but I've included it for completeness.
> ---
>  scripts/generate_rust_analyzer.py | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/scripts/generate_rust_analyzer.py b/scripts/generate_rust_analyzer.py
> index 3b169904ee41..b8080febc4bd 100755
> --- a/scripts/generate_rust_analyzer.py
> +++ b/scripts/generate_rust_analyzer.py
> @@ -96,7 +96,7 @@ def generate_crates(srctree, objtree, sysroot_src, external_src, cfgs, core_edit
>      append_crate(
>          "quote",
>          srctree / "rust" / "quote" / "lib.rs",
> -        ["alloc", "proc_macro", "proc_macro2"],
> +        ["core", "alloc", "std", "proc_macro", "proc_macro2"],
>          cfg=crates_cfgs["quote"],
>      )
>
> --
> 2.47.3
>
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ