ceced5322c
For example: ```rust let s = "123"; println!({}, "sss", s); ``` Suggest: `println!("{:?} {} {}", {}, "sss", s);` fixes #130170
47 lines
1.3 KiB
Plaintext
47 lines
1.3 KiB
Plaintext
error: format argument must be a string literal
|
|
--> $DIR/format-empty-block-unit-tuple-suggestion-130170.rs:5:14
|
|
|
|
|
LL | println!({}, "sss", s);
|
|
| ^^
|
|
|
|
|
help: you might be missing a string literal to format with
|
|
|
|
|
LL | println!("{:?} {} {}", {}, "sss", s);
|
|
| +++++++++++++
|
|
|
|
error: format argument must be a string literal
|
|
--> $DIR/format-empty-block-unit-tuple-suggestion-130170.rs:7:14
|
|
|
|
|
LL | println!({});
|
|
| ^^
|
|
|
|
|
help: you might be missing a string literal to format with
|
|
|
|
|
LL | println!("{:?}", {});
|
|
| +++++++
|
|
|
|
error: format argument must be a string literal
|
|
--> $DIR/format-empty-block-unit-tuple-suggestion-130170.rs:9:14
|
|
|
|
|
LL | println!(s, "sss", s, {});
|
|
| ^
|
|
|
|
|
help: you might be missing a string literal to format with
|
|
|
|
|
LL | println!("{} {} {} {:?}", s, "sss", s, {});
|
|
| ++++++++++++++++
|
|
|
|
error: format argument must be a string literal
|
|
--> $DIR/format-empty-block-unit-tuple-suggestion-130170.rs:11:14
|
|
|
|
|
LL | println!((), s, {});
|
|
| ^^
|
|
|
|
|
help: you might be missing a string literal to format with
|
|
|
|
|
LL | println!("{:?} {} {:?}", (), s, {});
|
|
| +++++++++++++++
|
|
|
|
error: aborting due to 4 previous errors
|
|
|