Skip to content

proc_macro::quote cannot be made useful for rust-analyzer

Open

Description

Macro in question: https://doc.rust-lang.org/proc_macro/macro.quote.html

What do I mean with this? Basically rust-analyzer cannot make use of the spans the macro generated, as these spans are generated and stored (via save_span) at compilation time of the macro, then loaded (via load_span) by the proc macro server when executed. rust-analyzer is not the tool that compiles the proc-macros though, so we are not the one saving any spans and as such we also can't really load them (even if we go through the artifacts produced, their representation differs from our spans). So for r-a to be able to make use of this feature (should it ever get stabilized), the implementation details would need to change in some way and/or r-a needs to be the one compiling the proc-macros somehow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    A-proc-macroproc macroproc macroC-ArchitectureBig architectural things which we need to figure up-front (or suggestions for rewrites :0) )Big architectural things which we need to figure up-front (or suggestions for rewrites :0) )C-tracking-issueCategory: tracking issueCategory: tracking issueS-unactionableIssue requires feedback, design decisions or is blocked on other workIssue requires feedback, design decisions or is blocked on other work

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions