You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have unit tests written for all of my proc macros by using proc_macro2 in my implementation and running the code as a normal Rust test. However if I use proc-macro-error-2 I get errors like
proc-macro-error2 API cannot be used outside of `entry_point` invocation,
If I wrap my macro code in a proc_macro_error2::entry_point call I get this error
procedural macro API is used outside of a procedural macro
I think the problem stems from the fact that entry_point() returns a proc_macro::TokenStream instead of proc_macro2::TokenStream. Is there another supported way of how to invoke code that contains proc-macro-error-2 code in a test environment?
The text was updated successfully, but these errors were encountered:
I have unit tests written for all of my proc macros by using proc_macro2 in my implementation and running the code as a normal Rust test. However if I use proc-macro-error-2 I get errors like
If I wrap my macro code in a
proc_macro_error2::entry_point
call I get this errorI think the problem stems from the fact that
entry_point()
returns aproc_macro::TokenStream
instead ofproc_macro2::TokenStream
. Is there another supported way of how to invoke code that contains proc-macro-error-2 code in a test environment?The text was updated successfully, but these errors were encountered: