Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for the special $crate identifier #344

Open
x-hgg-x opened this issue Aug 7, 2022 · 0 comments
Open

Support for the special $crate identifier #344

x-hgg-x opened this issue Aug 7, 2022 · 0 comments

Comments

@x-hgg-x
Copy link

x-hgg-x commented Aug 7, 2022

In my custom-format crate, I pass the special $crate identifier from a declarative macro to a procedural macro, which allows me to avoid using a crate such as proc-macro-crate. This identifier cannot be created with the Ident::new method, so the procedural macro cannot be tested with real inputs using the proc_macro2 crate.

Is it acceptable to extend this crate to allow constructing the $crate identifier via

proc_macro2::Ident::new("$crate", Span::call_site())

instead of panicking ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant