I like the changes to macros in module system, as someone already wrote above this will syntax will be pretty, (both foo
and bar
extern crates)
use foo::foo!;
use bar::{bar!, zoo!};
One thing may be inconsistent (in my opinion) is that for submodules we still need to use #[macro_use]
, it will be better to extents syntax for external crates for submodules.
In our crate, we have a zoo
submodule with #[macro_export]
, the above syntax is consistent.
use zoo::{zoo!, copy!};
This even leads to re-exports
for libs, being able to re-export their macros in a simplified prelude.
pub mod prelude {
pub use macros::{scr!, link!};
/* ... */
}