blob: a9a10f0e7eb9c19fc07ed09ba9d01bf7a6be3331 [file] [edit]
// Checks that there is a suggestion for simple tuple index access expression (used where an
// identifier is expected in a format arg) to use positional arg instead, with a note to move
// the expression into a local variable.
// Issue: <https://github.com/rust-lang/rust/issues/114108>.
//@ run-rustfix
fn main() {
let x = (1,);
println!("{0}", x.0);
//~^ ERROR invalid format string
}