rust/tests/ui/macros/meta-variable-depth-outside-repeat.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

13 lines
262 B
Rust
Raw Normal View History

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