We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 071c8e0 commit 4e48981Copy full SHA for 4e48981
src/macros/overload.md
@@ -7,19 +7,19 @@
7
macro_rules! test {
8
// 参数不需要使用逗号隔开。
9
// 参数可以任意组合!
10
- ($left:expr; and $right:expr) => (
+ ($left:expr; and $right:expr) => {
11
println!("{:?} and {:?} is {:?}",
12
stringify!($left),
13
stringify!($right),
14
$left && $right)
15
- );
+ };
16
// ^ 每个分支都必须以分号结束。
17
- ($left:expr; or $right:expr) => (
+ ($left:expr; or $right:expr) => {
18
println!("{:?} or {:?} is {:?}",
19
20
21
$left || $right)
22
23
}
24
25
fn main() {
0 commit comments