about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorDavid Renshaw <dwrenshaw@gmail.com>2021-12-31 12:26:10 -0500
committerDavid Renshaw <dwrenshaw@gmail.com>2021-12-31 12:42:15 -0500
commita661671ae37eece708d894eb25d58ec7dd2fd9a7 (patch)
tree5a0dc436f6afdda26a5604e03dc9322116ff76dc /src
parent8ed935e92dfb09ae388344b12284bf5110cf9265 (diff)
[rustc_builtin_macros] add indices to format_foreign::printf::Substitution::Escape
Diffstat (limited to 'src')
-rw-r--r--src/test/ui/macros/issue-92267.rs3
-rw-r--r--src/test/ui/macros/issue-92267.stderr16
2 files changed, 19 insertions, 0 deletions
diff --git a/src/test/ui/macros/issue-92267.rs b/src/test/ui/macros/issue-92267.rs
new file mode 100644
index 00000000000..f1daaeb743e
--- /dev/null
+++ b/src/test/ui/macros/issue-92267.rs
@@ -0,0 +1,3 @@
+// check-fail
+
+pub fn main() { println!("🦀%%%", 0) } //~ ERROR argument never used
diff --git a/src/test/ui/macros/issue-92267.stderr b/src/test/ui/macros/issue-92267.stderr
new file mode 100644
index 00000000000..d2d66c81198
--- /dev/null
+++ b/src/test/ui/macros/issue-92267.stderr
@@ -0,0 +1,16 @@
+error: argument never used
+  --> $DIR/issue-92267.rs:3:34
+   |
+LL | pub fn main() { println!("🦀%%%", 0) }
+   |                                   ^ argument never used
+   |
+note: format specifiers use curly braces, and the conversion specifier `
+      ` is unknown or unsupported
+  --> $DIR/issue-92267.rs:3:30
+   |
+LL | pub fn main() { println!("🦀%%%", 0) }
+   |                               ^^
+   = note: printf formatting not supported; see the documentation for `std::fmt`
+
+error: aborting due to previous error
+