macros1 solution

This commit is contained in:
mo8it 2024-07-01 11:28:38 +02:00
parent a13e3cd07f
commit cf90364fd7
3 changed files with 13 additions and 4 deletions

View file

@ -5,5 +5,6 @@ macro_rules! my_macro {
} }
fn main() { fn main() {
// TODO: Fix the macro call.
my_macro(); my_macro();
} }

View file

@ -1089,9 +1089,8 @@ name = "macros1"
dir = "21_macros" dir = "21_macros"
test = false test = false
hint = """ hint = """
When you call a macro, you need to add something special compared to a When you call a macro, you need to add something special compared to a regular
regular function call. If you're stuck, take a look at what's inside function call."""
`my_macro`."""
[[exercises]] [[exercises]]
name = "macros2" name = "macros2"

View file

@ -1 +1,10 @@
// Solutions will be available before the stable release. Thank you for testing the beta version 🥰 macro_rules! my_macro {
() => {
println!("Check out my macro!");
};
}
fn main() {
my_macro!();
// ^
}