summaryrefslogtreecommitdiffstats
path: root/tests/ui/macros/issue-86865.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/macros/issue-86865.rs')
-rw-r--r--tests/ui/macros/issue-86865.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/ui/macros/issue-86865.rs b/tests/ui/macros/issue-86865.rs
new file mode 100644
index 000000000..01e0a20a5
--- /dev/null
+++ b/tests/ui/macros/issue-86865.rs
@@ -0,0 +1,11 @@
+use std::fmt::Write;
+
+fn main() {
+ println!(b"foo");
+ //~^ ERROR format argument must be a string literal
+ //~| HELP consider removing the leading `b`
+ let mut s = String::new();
+ write!(s, b"foo{}", "bar");
+ //~^ ERROR format argument must be a string literal
+ //~| HELP consider removing the leading `b`
+}