diff options
Diffstat (limited to '')
-rw-r--r-- | src/test/ui/macros/issue-86865.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/test/ui/macros/issue-86865.rs b/src/test/ui/macros/issue-86865.rs new file mode 100644 index 000000000..01e0a20a5 --- /dev/null +++ b/src/test/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` +} |