Skip to content

Commit 5c42d69

Browse files
committed
#[rustfmt::skip]
macro_rules! my_macro { () => { println!("Check out my macro!"); }; // 添加分号分隔第一个分支 ($val:expr) => { println!("Look at this other macro: {}", $val); } } fn main() { my_macro!(); my_macro!(7777); }
1 parent 565fc8e commit 5c42d69

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

exercises/macros/macros4.rs

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,8 @@
1-
// macros4.rs
2-
//
3-
// Execute `rustlings hint macros4` or use the `hint` watch subcommand for a
4-
// hint.
5-
6-
// I AM NOT DONE
7-
81
#[rustfmt::skip]
92
macro_rules! my_macro {
103
() => {
114
println!("Check out my macro!");
12-
}
5+
}; // 添加分号分隔第一个分支
136
($val:expr) => {
147
println!("Look at this other macro: {}", $val);
158
}

0 commit comments

Comments
 (0)