From: "Gary Guo" <gary@garyguo.net>
To: engineer.jjhama@gmail.com, "Miguel Ojeda" <ojeda@kernel.org>,
"Boqun Feng" <boqun.feng@gmail.com>,
"Gary Guo" <gary@garyguo.net>,
"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
"Benno Lossin" <lossin@kernel.org>,
"Andreas Hindborg" <a.hindborg@kernel.org>,
"Alice Ryhl" <aliceryhl@google.com>,
"Trevor Gross" <tmgross@umich.edu>,
"Danilo Krummrich" <dakr@kernel.org>
Cc: <rust-for-linux@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
"Jesung Yang" <y.j3ms.n@gmail.com>
Subject: Re: [PATCH v2] scripts: generate_rust_analyzer: fix resolution of #[pin_data] macros
Date: Fri, 23 Jan 2026 16:50:22 +0000 [thread overview]
Message-ID: <DFW4GI1NXVGH.2AMO9KFBPUPED@garyguo.net> (raw)
In-Reply-To: <20260123-fix-pin-init-crate-dependecies-v2-1-bb1c2500e54c@gmail.com>
On Fri Jan 23, 2026 at 1:18 PM GMT, SeungJong Ha via B4 Relay wrote:
> From: SeungJong Ha <engineer.jjhama@gmail.com>
>
> Currently, rust-analyzer fails to properly resolve structs annotated with
> `#[pin_data]`. This prevents IDE features like "Go to Definition" from
> working correctly for those structs.
>
> Add the missing configuration to `generate_rust_analyzer.py` to ensure
> the `pin-init` crate macros are handled correctly.
>
> Signed-off-by: SeungJong Ha <engineer.jjhama@gmail.com>
Acked-by: Gary Guo <gary@garyguo.net>
> ---
> I encountered an issue where rust-analyzer fails to analyze
> structs decorated with the #[pin_data] attribute while testing
> Rust kernel modules.
>
> It appears that the dependencies for pin-init and drivers were
> missing from the analyzer's configuration. This patch adds
> those missing dependencies.
>
> I have verified that my rust-analyzer correctly processes
> \#[pin_data] structs after applying this fix.
>
> Best regards, SeungJong
> ---
> Changes in v2:
> - Fix typos
> - Drop the quote module workaround (will be handled separately)
> - Rebase onto `rust-fixes`
> - Add `pin_init` dependency for Rust drivers
> - Link to v1: https://lore.kernel.org/r/20260123-fix-pin-init-crate-dependecies-v1-1-1c6cfe9aa352@gmail.com
> ---
> scripts/generate_rust_analyzer.py | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
next prev parent reply other threads:[~2026-01-23 16:51 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-23 13:18 [PATCH v2] scripts: generate_rust_analyzer: fix resolution of #[pin_data] macros SeungJong Ha via B4 Relay
2026-01-23 15:42 ` Tamir Duberstein
2026-01-23 16:50 ` Gary Guo [this message]
2026-01-24 0:43 ` Jesung Yang
2026-01-24 2:14 ` 하승종
2026-01-24 5:00 ` Jesung Yang
2026-01-26 3:13 ` Miguel Ojeda
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=DFW4GI1NXVGH.2AMO9KFBPUPED@garyguo.net \
--to=gary@garyguo.net \
--cc=a.hindborg@kernel.org \
--cc=aliceryhl@google.com \
--cc=bjorn3_gh@protonmail.com \
--cc=boqun.feng@gmail.com \
--cc=dakr@kernel.org \
--cc=engineer.jjhama@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lossin@kernel.org \
--cc=ojeda@kernel.org \
--cc=rust-for-linux@vger.kernel.org \
--cc=tmgross@umich.edu \
--cc=y.j3ms.n@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox