rust/tests/ui/macros/meta-variable-depth-outside-repeat.rs
2023-01-11 09:32:08 +00:00

13 lines
268 B
Rust

#![feature(macro_metavar_expr)]
macro_rules! metavar {
( $i:expr ) => {
${length(0)}
//~^ ERROR meta-variable expression `length` with depth parameter must be called inside of a macro repetition
};
}
const _: i32 = metavar!(0);
fn main() {}