-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Open
Labels
A-decl-macros-1-2Area: Declarative macros 1.2Area: Declarative macros 1.2C-feature-requestCategory: A feature request, i.e: not implemented / a PR.Category: A feature request, i.e: not implemented / a PR.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Description
One Reddit user was asking how to reference the invoking crate in a proc-macro, suggesting that quote!{}
should support the $crate
metavar. I don't think this is too unreasonable since $
is already used for unquoting variables but crate
couldn't be a user variable since it's a keyword.
Alternately, I think Span
could have a method telling us what crate it comes from as a String
.
Metadata
Metadata
Assignees
Labels
A-decl-macros-1-2Area: Declarative macros 1.2Area: Declarative macros 1.2C-feature-requestCategory: A feature request, i.e: not implemented / a PR.Category: A feature request, i.e: not implemented / a PR.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.