mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-30 10:45:18 +00:00
17 lines
247 B
Rust
17 lines
247 B
Rust
//@ 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");
|
|
}
|