Re: [PATCH] rust: rust-analyzer: add proc_macro for macros crate

From: Alice Ryhl
Date: Mon Jan 06 2025 - 08:42:48 EST


On Thu, Dec 5, 2024 at 12:54 PM Fiona Behrens <me@xxxxxxxxxx> wrote:
>
> Add the proc_macro crate from the rust sysroot to the
> rust-project.json file used by rust-analyzer. This allows
> rust-analyzer to autocomplete items from the proc_macro crate inside
> the macros crate.
>
> This also adds std and alloc only to be used by proc_macro and
> macros. This does not add the dependencies of those crates as this is
> sufficent for rust-analyzer to have a basic autocompletion support
> without having to worry about all the dependencies std usually needs.
> alloc is added, as e.g. std::vec just reexports from alloc, so that
> macros can use autocompletion for Vec and similar.

If you say that's sufficient, then I believe you.

> Signed-off-by: Fiona Behrens <me@xxxxxxxxxx>

Reviewed-by: Alice Ryhl <aliceryhl@xxxxxxxxxx>