docs

您正在閱讀 v0.1.2 的文件。Nabi 0.1.2 已停止支援。 最新版本:v0.1.3 →

本頁尚未翻譯,以下為英文原文。

#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