1
0
mirror of https://github.com/rust-lang/rustlings.git synced 2024-12-12 11:14:55 +02:00
rustlings/exercises/macros/macros1.rs

65 lines
387 B
Rust
Raw Normal View History

2018-02-22 08:09:53 +02:00
// macros1.rs
2017-03-17 16:30:29 +02:00
// Make me compile! Scroll down for hints :)
macro_rules! my_macro {
() => {
println!("Check out my macro!");
};
}
fn main() {
my_macro();
}
2017-03-19 16:10:48 +02:00
// 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`.