rustlings/exercises/21_macros/macros3.rs

15 lines
257 B
Rust
Raw Permalink Normal View History

2024-10-28 20:46:17 +00:00
// TODO: Fix the compiler error without taking the macro definition out of this
// module.
2024-11-09 11:43:57 +00:00
#[macro_use]
2024-10-28 20:46:17 +00:00
mod macros {
macro_rules! my_macro {
() => {
println!("Check out my macro!");
};
}
}
fn main() {
my_macro!();
}