rust/tests/ui/unpretty/flattened-format-args.rs
Lukas Wirth 20ab952b4d Explicitly annotate edition for unpretty=expanded and unpretty=hir tests
These emit prelude imports which means they are always edition dependent
2025-04-16 11:10:10 +02:00

10 lines
242 B
Rust

//@ compile-flags: -Zunpretty=hir -Zflatten-format-args=yes
//@ check-pass
//@ edition: 2015
fn main() {
let x = 1;
// Should flatten to println!("a 123 b {x} xyz\n"):
println!("a {} {}", format_args!("{} b {x}", 123), "xyz");
}