[PATCH] rust: pin_init_internal: fix rust-analyzer `mod quote`

From: Tamir Duberstein
Date: Wed Mar 19 2025 - 21:35:58 EST


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@xxxxxxxxx>
---
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@xxxxxxxxx>