How to disable the unused macros warning? --rust
Posted on 2019-07-15 16:35 DotNet1010 阅读(269) 评论(0) 编辑 收藏 举报
#[allow(unused_macros)]
macro_rules! unless {
($arg:expr,$branch:expr) => {
if !$arg {$branch};
};
}
fn main() {
println!("Hello, world!");
unless!(2>3,println!("this is my first macros!"))
}