summaryrefslogtreecommitdiffstats
path: root/tests/ui/macros/meta-variable-depth-outside-repeat.rs
blob: b7fb947854f04fe0ffb7c23e94b73931d028256f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#![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() {}