about summary refs log tree commit diff
path: root/tests/ui/macros/format-empty-block-unit-tuple-suggestion-130170.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/macros/format-empty-block-unit-tuple-suggestion-130170.rs')
-rw-r--r--tests/ui/macros/format-empty-block-unit-tuple-suggestion-130170.rs13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/ui/macros/format-empty-block-unit-tuple-suggestion-130170.rs b/tests/ui/macros/format-empty-block-unit-tuple-suggestion-130170.rs
new file mode 100644
index 00000000000..c09b2a04061
--- /dev/null
+++ b/tests/ui/macros/format-empty-block-unit-tuple-suggestion-130170.rs
@@ -0,0 +1,13 @@
+//@ 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
+}