Open
Description
Currently when a metavariable expression is used outside of any repetitions, it produces a somewhat cryptic error message instead of saying its not within a repetitions, example:
#![feature(macro_metavar_expr)]
macro_rules! f {
($n:ident) => {
${length()};
}
}
fn main() {
f!(a);
}
error: length depth must be less than 0
--> src/main.rs:5:10
|
5 | ${length()};
| ^^^^^^^^^^