Closed Gekkio closed 5 years ago
You can use $crate
, or #[macro_export(local_inner_macros)]
for compatibility with Rust 2015 edition.
I guess that's my fault, sorry. :/
$crate
does not work, it fails on CI in the Rust 1.25 job.
Should be fixed by https://github.com/Gilnaa/memoffset/pull/16. Does anyone have a suggestion for how to test this on CI? There already is a test with Rust 1.25.
The primary macro implementations in memoffset 0.5 use other secondary macros, but don't scope them with $crate (or something like that, I don't actually know what the proper syntax is).
This causes a problem at the use site: if only the main macro is imported, the macro invocation expands to code that won't compile.