1
0
mirror of https://github.com/rust-lang/rustlings.git synced 2025-01-26 04:22:03 +02:00

19 lines
337 B
Rust
Raw Normal View History

2018-02-21 22:09:53 -08:00
// macros4.rs
2022-07-15 12:05:26 +02:00
// Execute `rustlings hint macros4` or use the `hint` watch subcommand for a hint.
2017-03-17 09:47:45 -05:00
// I AM NOT DONE
2017-03-17 09:47:45 -05:00
macro_rules! my_macro {
() => {
println!("Check out my macro!");
}
2017-03-17 09:47:45 -05:00
($val:expr) => {
println!("Look at this other macro: {}", $val);
}
2017-03-17 09:47:45 -05:00
}
fn main() {
my_macro!();
my_macro!(7777);
}