public inbox for rust-for-linux@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] rust: pin_init_internal: fix rust-analyzer `mod quote`
@ 2025-03-20  1:35 Tamir Duberstein
  2025-03-20  7:46 ` Alice Ryhl
  2025-03-20 12:16 ` Benno Lossin
  0 siblings, 2 replies; 9+ messages in thread
From: Tamir Duberstein @ 2025-03-20  1:35 UTC (permalink / raw)
  To: Benno Lossin, Miguel Ojeda, Alex Gaynor, Boqun Feng, Gary Guo,
	Björn Roy Baron, Andreas Hindborg, Alice Ryhl, Trevor Gross,
	Danilo Krummrich
  Cc: linux-kernel, rust-for-linux, Tamir Duberstein

Replace the `#[path]` attribute with a symlink to work around a
limitation in rust-analyzer that requires all modules to belong to the
same "source root". This allows code navigation from `pin_init_internal`
to `quote` to work properly.

Link: https://github.com/rust-lang/rust-analyzer/issues/3898
Signed-off-by: Tamir Duberstein <tamird@gmail.com>
---
 rust/pin-init/internal/src/lib.rs   | 1 -
 rust/pin-init/internal/src/quote.rs | 1 +
 2 files changed, 1 insertion(+), 1 deletion(-)

diff --git a/rust/pin-init/internal/src/lib.rs b/rust/pin-init/internal/src/lib.rs
index babe5e878550..fdd95afe3864 100644
--- a/rust/pin-init/internal/src/lib.rs
+++ b/rust/pin-init/internal/src/lib.rs
@@ -20,7 +20,6 @@
 use proc_macro::TokenStream;
 
 #[cfg(kernel)]
-#[path = "../../../macros/quote.rs"]
 #[macro_use]
 mod quote;
 #[cfg(not(kernel))]
diff --git a/rust/pin-init/internal/src/quote.rs b/rust/pin-init/internal/src/quote.rs
new file mode 120000
index 000000000000..27a213d1a6ba
--- /dev/null
+++ b/rust/pin-init/internal/src/quote.rs
@@ -0,0 +1 @@
+../../../macros/quote.rs
\ No newline at end of file

---
base-commit: ff7f9b199e3f4cc7d61df5a9a26a7cbb5c1492e6
change-id: 20250319-pin-init-internal-quote-b7e15e9e8233

Best regards,
-- 
Tamir Duberstein <tamird@gmail.com>


^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2025-12-23  1:32 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-20  1:35 [PATCH] rust: pin_init_internal: fix rust-analyzer `mod quote` Tamir Duberstein
2025-03-20  7:46 ` Alice Ryhl
2025-03-20 10:16   ` Tamir Duberstein
2025-03-20 12:16 ` Benno Lossin
2025-03-20 13:31   ` Tamir Duberstein
2025-03-20 14:10     ` Benno Lossin
2025-03-20 14:15       ` Tamir Duberstein
2025-12-22 12:43         ` Tamir Duberstein
2025-12-23  1:32           ` Benno Lossin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox