Skip to content

Commit 24c8930

Browse files
committed
// macros1.rs
// // Execute `rustlings hint macros1` or use the `hint` watch subcommand for a // hint. // I AM NOT DONE macro_rules! my_macro { () => { println!("Check out my macro!"); }; } fn main() { my_macro!(); // 在宏名称后添加!以正确调用宏 }
1 parent 5d04b2b commit 24c8930

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

exercises/macros/macros1.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,6 @@ macro_rules! my_macro {
1212
}
1313

1414
fn main() {
15-
my_macro();
15+
my_macro!(); // 在宏名称后添加!以正确调用宏
1616
}
17+

0 commit comments

Comments
 (0)