summaryrefslogtreecommitdiff
path: root/solutions/21_macros/macros3.rs
blob: df35be4d9a5500ba057bea128697609a7ca68352 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// Added the attribute `macro_use` attribute.
#[macro_use]
mod macros {
    macro_rules! my_macro {
        () => {
            println!("Check out my macro!");
        };
    }
}

fn main() {
    my_macro!();
}