Rust <10>:宏导出、导入

源 crate 中使用 #[macro_export] 属性标记的宏,调用者可在导入此 crate 时添加 #[macro_use] 属性使用。

没有 #[macro_export] 的宏,外部不可见!

posted @ 2018-03-17 17:22  范辉  阅读(1505)  评论(0编辑  收藏  举报