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
We currently rely on a catch_unwind to detect whether Span::call_site() works, i.e. whether we are executing inside of a procedural macro as opposed to any other binary.
Unfortunately this is incompatible with using proc-macro2 (or quote, syn) in a non-macro way inside of binaries that are built with panic=abort, as they will just abort on that line.
rust-lang/rust#71436 adds a proc_macro::is_available() function to do this detection in a way that no longer relies on panicking.
Once the first 1.45-beta release is available, we should add some detection in build.rs to begin using proc_macro::is_available() on dev compiler builds.
The text was updated successfully, but these errors were encountered:
For now, #220 allows a workaround for some of the need for this. Non-macros that want to support panic=abort can call proc_macro2::fallback::force() to bypass the panicking codepath in proc macro detection.
We currently rely on a catch_unwind to detect whether Span::call_site() works, i.e. whether we are executing inside of a procedural macro as opposed to any other binary.
https://github.com/alexcrichton/proc-macro2/blob/eed1e2fe228a7b26241847c2b1a79031abab59e8/src/wrapper.rs#L77
Unfortunately this is incompatible with using proc-macro2 (or quote, syn) in a non-macro way inside of binaries that are built with panic=abort, as they will just abort on that line.
rust-lang/rust#71436 adds a proc_macro::is_available() function to do this detection in a way that no longer relies on panicking.
Once the first 1.45-beta release is available, we should add some detection in build.rs to begin using proc_macro::is_available() on dev compiler builds.
The text was updated successfully, but these errors were encountered: