rust/tests/ui/macros/issue-86865.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

12 lines
329 B
Rust
Raw Normal View History

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`
}