<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/scripts/generate_rust_analyzer.py, branch v6.19.11</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.19.11</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.19.11'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2026-01-26T01:19:29+00:00</updated>
<entry>
<title>scripts: generate_rust_analyzer: fix resolution of #[pin_data] macros</title>
<updated>2026-01-26T01:19:29+00:00</updated>
<author>
<name>SeungJong Ha</name>
<email>engineer.jjhama@gmail.com</email>
</author>
<published>2026-01-23T13:18:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e440bc5c190cd0e5f148b2892aeb1f4bbbf54507'/>
<id>urn:sha1:e440bc5c190cd0e5f148b2892aeb1f4bbbf54507</id>
<content type='text'>
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 &lt;engineer.jjhama@gmail.com&gt;
Fixes: d7659acca7a3 ("rust: add pin-init crate build infrastructure")
Cc: stable@vger.kernel.org
Tested-by: Tamir Duberstein &lt;tamird@kernel.org&gt;
Acked-by: Tamir Duberstein &lt;tamird@kernel.org&gt;
Acked-by: Gary Guo &lt;gary@garyguo.net&gt;
Reviewed-by: Jesung Yang &lt;y.j3ms.n@gmail.com&gt;
Link: https://patch.msgid.link/20260123-fix-pin-init-crate-dependecies-v2-1-bb1c2500e54c@gmail.com
Signed-off-by: Miguel Ojeda &lt;ojeda@kernel.org&gt;
</content>
</entry>
<entry>
<title>scripts: generate_rust_analyzer: compile sysroot with correct edition</title>
<updated>2026-01-18T19:26:29+00:00</updated>
<author>
<name>Tamir Duberstein</name>
<email>tamird@kernel.org</email>
</author>
<published>2026-01-16T20:46:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ac3c50b9a24e9ebeb585679078d6c47922034bb6'/>
<id>urn:sha1:ac3c50b9a24e9ebeb585679078d6c47922034bb6</id>
<content type='text'>
Use `core_edition` for all sysroot crates rather than just core as all
were updated to edition 2024 in Rust 1.87.

Fixes: f4daa80d6be7 ("rust: compile libcore with edition 2024 for 1.87+")
Signed-off-by: Tamir Duberstein &lt;tamird@kernel.org&gt;
Cc: stable@vger.kernel.org
Link: https://patch.msgid.link/20260116-rust-analyzer-sysroot-v2-1-094aedc33208@kernel.org
[ Added `&gt;`s to make the quote a single block. - Miguel ]
Signed-off-by: Miguel Ojeda &lt;ojeda@kernel.org&gt;
</content>
</entry>
<entry>
<title>scripts: generate_rust_analyzer: compile quote with correct edition</title>
<updated>2026-01-18T19:26:29+00:00</updated>
<author>
<name>Tamir Duberstein</name>
<email>tamird@gmail.com</email>
</author>
<published>2026-01-15T16:45:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=bc83834c157676e7cca62b876b5e3da1bee06285'/>
<id>urn:sha1:bc83834c157676e7cca62b876b5e3da1bee06285</id>
<content type='text'>
Our copy of the quote crate uses edition 2018, thus generate the correct
rust-analyzer configuration for it.

Fixes: 88de91cc1ce7 ("rust: quote: enable support in kbuild")
Signed-off-by: Tamir Duberstein &lt;tamird@gmail.com&gt;
Reviewed-by: Jesung Yang &lt;y.j3ms.n@gmail.com&gt;
Reviewed-by: Gary Guo &lt;gary@garyguo.net&gt;
Link: https://patch.msgid.link/20260115-rust-analyzer-quote-edition-v1-1-d492f880dde4@gmail.com
Signed-off-by: Miguel Ojeda &lt;ojeda@kernel.org&gt;
</content>
</entry>
<entry>
<title>scripts: generate_rust_analyzer: quote: treat `core` and `std` as dependencies</title>
<updated>2026-01-18T19:26:26+00:00</updated>
<author>
<name>Jesung Yang</name>
<email>y.j3ms.n@gmail.com</email>
</author>
<published>2025-11-25T09:33:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=3a50257e560043bf8968f807af65f32c98d7dbf9'/>
<id>urn:sha1:3a50257e560043bf8968f807af65f32c98d7dbf9</id>
<content type='text'>
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 &lt;y.j3ms.n@gmail.com&gt;
Reviewed-by: Tamir Duberstein &lt;tamird@gmail.com&gt;
Link: https://patch.msgid.link/cef76fc1105481d219953c8552eb5eb07dac707a.1764062688.git.y.j3ms.n@gmail.com
[ Reworded title. - Miguel ]
Signed-off-by: Miguel Ojeda &lt;ojeda@kernel.org&gt;
</content>
</entry>
<entry>
<title>scripts: generate_rust_analyzer: syn: treat `std` as a dependency</title>
<updated>2026-01-18T19:25:26+00:00</updated>
<author>
<name>Jesung Yang</name>
<email>y.j3ms.n@gmail.com</email>
</author>
<published>2025-11-25T09:32:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=87417cc95b0f1096cc27011ec750d9f988a63e83'/>
<id>urn:sha1:87417cc95b0f1096cc27011ec750d9f988a63e83</id>
<content type='text'>
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&lt;..&gt;` and
`Option&lt;..&gt;`, 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 &lt;y.j3ms.n@gmail.com&gt;
Reviewed-by: Tamir Duberstein &lt;tamird@gmail.com&gt;
Tested-by: Tamir Duberstein &lt;tamird@gmail.com&gt;
Link: https://patch.msgid.link/6dbdf6e1c1639ae381ca9ab7041f84728ffa2267.1764062688.git.y.j3ms.n@gmail.com
[ Reworded title. - Miguel ]
Signed-off-by: Miguel Ojeda &lt;ojeda@kernel.org&gt;
</content>
</entry>
<entry>
<title>scripts: generate_rust_analyzer: remove sysroot assertion</title>
<updated>2026-01-18T19:24:15+00:00</updated>
<author>
<name>Onur Özkan</name>
<email>work@onurozkan.dev</email>
</author>
<published>2025-12-24T13:53:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=1b83ef9f7ad4635c913b80ef5e718f95f48e85af'/>
<id>urn:sha1:1b83ef9f7ad4635c913b80ef5e718f95f48e85af</id>
<content type='text'>
With nixpkgs's rustc, rust-src component is not bundled
with the compiler by default and is instead provided from
a separate store path, so this assumption does not hold.

The assertion assumes these paths are in the same location
which causes `make LLVM=1 rust-analyzer` to fail on NixOS.

Link: https://rust-for-linux.zulipchat.com/#narrow/stream/x/topic/x/near/565284250
Signed-off-by: Onur Özkan &lt;work@onurozkan.dev&gt;
Reviewed-by: Gary Guo &lt;gary@garyguo.net&gt;
Fixes: fe992163575b ("rust: Support latest version of `rust-analyzer`")
Cc: stable@vger.kernel.org
Link: https://patch.msgid.link/20251224135343.32476-1-work@onurozkan.dev
[ Reworded title. - Miguel ]
Signed-off-by: Miguel Ojeda &lt;ojeda@kernel.org&gt;
</content>
</entry>
<entry>
<title>scripts: generate_rust_analyzer: Add pin_init_internal deps</title>
<updated>2026-01-14T18:53:02+00:00</updated>
<author>
<name>Tamir Duberstein</name>
<email>tamird@kernel.org</email>
</author>
<published>2025-07-23T15:39:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=74e15ac34b098934895fd27655d098971d2b43d9'/>
<id>urn:sha1:74e15ac34b098934895fd27655d098971d2b43d9</id>
<content type='text'>
Commit d7659acca7a3 ("rust: add pin-init crate build infrastructure")
did not add dependencies to `pin_init_internal`, resulting in broken
navigation. Thus add them now.

[ Tamir elaborates:

  "before this series, go-to-symbol from pin_init_internal to e.g.
   proc_macro::TokenStream doesn't work."

     - Miguel ]

Signed-off-by: Tamir Duberstein &lt;tamird@kernel.org&gt;
Reviewed-by: Jesung Yang &lt;y.j3ms.n@gmail.com&gt;
Acked-by: Benno Lossin &lt;lossin@kernel.org&gt;
Fixes: d7659acca7a3 ("rust: add pin-init crate build infrastructure")
Cc: stable@vger.kernel.org
Link: https://patch.msgid.link/20250723-rust-analyzer-pin-init-v1-3-3c6956173c78@kernel.org
Signed-off-by: Miguel Ojeda &lt;ojeda@kernel.org&gt;
</content>
</entry>
<entry>
<title>scripts: generate_rust_analyzer: Add pin_init -&gt; compiler_builtins dep</title>
<updated>2026-01-14T18:53:02+00:00</updated>
<author>
<name>Tamir Duberstein</name>
<email>tamird@kernel.org</email>
</author>
<published>2025-07-23T15:39:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=98dcca855343512a99432224447f07c5988753ad'/>
<id>urn:sha1:98dcca855343512a99432224447f07c5988753ad</id>
<content type='text'>
Add a dependency edge from `pin_init` to `compiler_builtins` to
`scripts/generate_rust_analyzer.py` to match `rust/Makefile`. This has
been incorrect since commit d7659acca7a3 ("rust: add pin-init crate
build infrastructure").

Signed-off-by: Tamir Duberstein &lt;tamird@kernel.org&gt;
Reviewed-by: Jesung Yang &lt;y.j3ms.n@gmail.com&gt;
Acked-by: Benno Lossin &lt;lossin@kernel.org&gt;
Fixes: d7659acca7a3 ("rust: add pin-init crate build infrastructure")
Cc: stable@vger.kernel.org
Link: https://patch.msgid.link/20250723-rust-analyzer-pin-init-v1-2-3c6956173c78@kernel.org
Signed-off-by: Miguel Ojeda &lt;ojeda@kernel.org&gt;
</content>
</entry>
<entry>
<title>scripts: generate_rust_analyzer: Add compiler_builtins -&gt; core dep</title>
<updated>2026-01-14T18:53:02+00:00</updated>
<author>
<name>Tamir Duberstein</name>
<email>tamird@kernel.org</email>
</author>
<published>2025-07-23T15:39:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=5157c328edb35bac05ce77da473c3209d20e0bbb'/>
<id>urn:sha1:5157c328edb35bac05ce77da473c3209d20e0bbb</id>
<content type='text'>
Add a dependency edge from `compiler_builtins` to `core` to
`scripts/generate_rust_analyzer.py` to match `rust/Makefile`. This has
been incorrect since commit 8c4555ccc55c ("scripts: add
`generate_rust_analyzer.py`")

Signed-off-by: Tamir Duberstein &lt;tamird@kernel.org&gt;
Reviewed-by: Jesung Yang &lt;y.j3ms.n@gmail.com&gt;
Acked-by: Benno Lossin &lt;lossin@kernel.org&gt;
Fixes: 8c4555ccc55c ("scripts: add `generate_rust_analyzer.py`")
Cc: stable@vger.kernel.org
Link: https://patch.msgid.link/20250723-rust-analyzer-pin-init-v1-1-3c6956173c78@kernel.org
Signed-off-by: Miguel Ojeda &lt;ojeda@kernel.org&gt;
</content>
</entry>
<entry>
<title>rust: macros: support `proc-macro2`, `quote` and `syn`</title>
<updated>2025-11-24T16:15:50+00:00</updated>
<author>
<name>Miguel Ojeda</name>
<email>ojeda@kernel.org</email>
</author>
<published>2025-11-24T15:18:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=52ba807f1aa6ac16289e9dc9e381475305afd685'/>
<id>urn:sha1:52ba807f1aa6ac16289e9dc9e381475305afd685</id>
<content type='text'>
One of the two main uses cases for adding `proc-macro2`, `quote` and
`syn` is the `macros` crates (and the other `pin-init`).

Thus add the support for the crates in `macros` already.

Tested-by: Jesung Yang &lt;y.j3ms.n@gmail.com&gt;
Link: https://patch.msgid.link/20251124151837.2184382-21-ojeda@kernel.org
Signed-off-by: Miguel Ojeda &lt;ojeda@kernel.org&gt;
</content>
</entry>
</feed>
