Re: [PATCH 2/2] rust: quote: make rust-analyzer treat `core` and `std` as dependencies
From: Jesung Yang
Date: Mon Jan 05 2026 - 10:31:17 EST
On Mon, Jan 5, 2026 at 11:06 PM Miguel Ojeda
<miguel.ojeda.sandonis@xxxxxxxxx> wrote:
>
> On Mon, Jan 5, 2026 at 1:12 PM Jesung Yang <y.j3ms.n@xxxxxxxxx> wrote:
> >
> > IIUC, to remove `std`, we need to patch our vendored `syn` as well to
> > not depend on `std`, right? I think it is indeed a desired change.
> >
> > If you don't mind, I'm happy to patch the vendored `syn` along with
> > this series if the team agrees. Alternatively, if you'd prefer to send
> > the patch yourself, please let me know.
>
> What are the advantages/disadvantages of doing so? Performance in rust-analyzer?
There's no noticeable performance improvement, at least in my setup.
Even though it seems desired, for now I don't think there is a clear
benefit, as `syn` is currently only used in the macros crate which
already depends on `std`. For the same reason, keeping the `std`
dependency in `syn` does not cause actual harm for the time being.
> In general, I would prefer to avoid patching vendored dependencies,
> but if there is an advantage, then I think it is fine to have small
> changes as long as upstream has merged their PR (i.e. so that we at
> least know there is a good chance we will eventually get the same
> change when we upgrade the dependency).
I think applying this series as-is and revisiting the `std` removal
when we eventually upgrade `syn` (so that the PR effectively lands in
our vendored `syn`) is also an option. If there's no upcoming upgrade
planned for the near future, I would personally prefer this approach.
Best regards,
Jesung