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

Use proc_macro instead of proc_macro_hack when supported #11

Closed
Scoder12 opened this issue Jun 9, 2021 · 3 comments
Closed

Use proc_macro instead of proc_macro_hack when supported #11

Scoder12 opened this issue Jun 9, 2021 · 3 comments

Comments

@Scoder12
Copy link

Scoder12 commented Jun 9, 2021

The macros using proc_macro_hack don't work with Rust Analyzer ( rust-lang/rust-analyzer#6835 ).

From the proc-macro-hack repo:

Note: As of Rust 1.45 this crate is superseded by native support for #[proc_macro] in expression position. Only consider using this crate if you care about supporting compilers between 1.31 and 1.45.

If supported older compilers is important, it is possible to use build cfg attrs to conditionally use proc_macro only when it is supported. Here is an example of a PR that does that: rust-lang/futures-rs#2407

If supporting older compilers isn't a concern, proc_macro_hack can simply be replaced with proc_macro.

@Scoder12
Copy link
Author

Scoder12 commented Jun 9, 2021

BTW, thank you so much for maintaining this library, it is awesome!

@Nadrieril
Copy link
Owner

Good point! I'll look into fixing that

@Nadrieril
Copy link
Owner

Done! This is released in v1.1.0

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

2 participants