I have a file which contains shared macros for a Rust project.
Since I want to re-use the macros across the crate (between modules), I declare the module with #[macro_use]
.
While writing the macros, I split out some shared logic into a macro to avoid repetition, in this case I can't use a private function, it needs to be a macro. If possible, I'd like to hide this shared macro so it can't be used directly by other modules.
Is there a way to make some macros private, so they aren't exposed to other modules in the same crate via #[macro_use]
?