本页尚未翻译,以下为英文原文。
#E0117: no macro rule matches
None of the macro's rules matches the arguments of this call. Check the call against the macro's matchers.
nabi
#[impl_macro(twice)] @macro {
( @e: expr ) => { { let v = @e; (v, v) } }
}
let p = twice!();
error[E0117]: no rule of macro `twice!` matches this call --> main.nabi:4:9 | 4 | let p = twice!(); | ^^^^^
Call it with arguments a rule matches:
nabi
#[impl_macro(twice)] @macro {
( @e: expr ) => { { let v = @e; (v, v) } }
}
let p = twice!(3);
println(f"{p.0}");
3
Related: E0116 malformed macro definition
Found a mistake? Edit this page on GitHub. Last updated