about summary refs log tree commit diff
path: root/tests/ui/macros/meta-variable-depth-outside-repeat.rs
blob: 89b47063606179ae36b5bafd078e7a8b8f13dea4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#![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() {}