mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 23:04:33 +00:00
ceced5322c
For example: ```rust let s = "123"; println!({}, "sss", s); ``` Suggest: `println!("{:?} {} {}", {}, "sss", s);` fixes #130170
14 lines
431 B
Rust
14 lines
431 B
Rust
//@ run-rustfix
|
|
|
|
fn main() {
|
|
let s = "123";
|
|
println!("{:?} {} {}", {}, "sss", s);
|
|
//~^ ERROR format argument must be a string literal
|
|
println!("{:?}", {});
|
|
//~^ ERROR format argument must be a string literal
|
|
println!("{} {} {} {:?}", s, "sss", s, {});
|
|
//~^ ERROR format argument must be a string literal
|
|
println!("{:?} {} {:?}", (), s, {});
|
|
//~^ ERROR format argument must be a string literal
|
|
}
|