Use `proc_macro` instead of `proc_macro_hack` when supported
spencerpogo opened this issue · 3 comments
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.
BTW, thank you so much for maintaining this library, it is awesome!
Good point! I'll look into fixing that
Done! This is released in v1.1.0