summaryrefslogtreecommitdiffstats
path: root/tests/ui/macros/trace_macros-format.rs
blob: afca45ca0f29338b66f26c97ce5fb7d031a6863c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#![feature(trace_macros)]

fn main() {
    trace_macros!(); //~ ERROR trace_macros! accepts only `true` or `false`
    trace_macros!(1); //~ ERROR trace_macros! accepts only `true` or `false`
    trace_macros!(ident); //~ ERROR trace_macros! accepts only `true` or `false`
    trace_macros!(for); //~ ERROR trace_macros! accepts only `true` or `false`
    trace_macros!(true,); //~ ERROR trace_macros! accepts only `true` or `false`
    trace_macros!(false 1); //~ ERROR trace_macros! accepts only `true` or `false`


    // should be fine:
    macro_rules! expando {
        ($x: ident) => { trace_macros!($x) }
    }

    expando!(true);
}