summaryrefslogtreecommitdiffstats
path: root/tests/ui/fmt/format-args-capture-first-literal-is-macro.rs
blob: bf5c0dcb54d39b946e60957f77c3c16f30e08899 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// aux-build:format-string-proc-macro.rs

#[macro_use]
extern crate format_string_proc_macro;

macro_rules! identity_mbe {
    ($tt:tt) => {
        $tt
        //~^ ERROR there is no argument named `a`
    };
}

fn main() {
    let a = 0;

    format!(identity_pm!("{a}"));
    //~^ ERROR there is no argument named `a`
    format!(identity_mbe!("{a}"));
    format!(concat!("{a}"));
    //~^ ERROR there is no argument named `a`
}