1
0
Fork 0
mirror of https://github.com/rust-lang/rustlings.git synced 2024-05-25 17:36:11 +02:00
rustlings/old_curriculum/macros/macros1.rs
2018-04-26 21:29:11 +02:00

65 lines
387 B
Rust

// macros1.rs
// Make me compile! Scroll down for hints :)
macro_rules! my_macro {
() => {
println!("Check out my macro!");
};
}
fn main() {
my_macro();
}
// When you call a macro, you need to add something special compared to a
// regular function call. If you're stuck, take a look at what's inside
// `my_macro`.