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

From: Tamir Duberstein
Date: Thu Mar 20 2025 - 06:17:27 EST


On Thu, Mar 20, 2025 at 3:46 AM Alice Ryhl <aliceryhl@xxxxxxxxxx> wrote:
>
> On Wed, Mar 19, 2025 at 09:35:40PM -0400, Tamir Duberstein wrote:
> > 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>
>
> Are we allowed to have symlinks?

There are 77 symlinks in the kernel by my count. Perhaps most
interesting are these:

include/dt-bindings/clock/qcom,dispcc-sm8150.h
include/dt-bindings/clock/qcom,dispcc-sm8350.h
include/dt-bindings/clock/qcom,sm8650-dispcc.h
include/dt-bindings/input/linux-event-codes.h

I'm not sure if there are further criteria we need to satisfy.