diff options
Diffstat (limited to 'solutions')
| -rw-r--r-- | solutions/21_macros/macros2.rs | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/solutions/21_macros/macros2.rs b/solutions/21_macros/macros2.rs index 4e18198..b6fd5d2 100644 --- a/solutions/21_macros/macros2.rs +++ b/solutions/21_macros/macros2.rs @@ -1 +1,10 @@ -// Solutions will be available before the stable release. Thank you for testing the beta version 🥰 +// Moved the macro definition to be before its call. +macro_rules! my_macro { + () => { + println!("Check out my macro!"); + }; +} + +fn main() { + my_macro!(); +} |
