about summary refs log tree commit diff
path: root/tests/ui/fmt/format-args-capture-macro-hygiene-pass.rs
blob: 53910afe28b795baa0e3233a737cb2d79d5a3008 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
//@ run-pass

macro_rules! format_mbe {
    ($tt:tt) => {
        {
            #[allow(unused_variables)]
            let a = 123;
            format!($tt)
        }
    };
}

fn main() {
    let a = 0;
    assert_eq!(format_mbe!("{a}"), "0");
}