macros4.rs (303B)
1 // TODO: Fix the compiler error by adding one or two characters. 2 #[rustfmt::skip] 3 macro_rules! my_macro { 4 () => { 5 println!("Check out my macro!"); 6 } 7 ($val:expr) => { 8 println!("Look at this other macro: {}", $val); 9 } 10 } 11 12 fn main() { 13 my_macro!(); 14 my_macro!(7777); 15 }