mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-12 08:36:03 +00:00
12 lines
329 B
Rust
12 lines
329 B
Rust
|
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`
|
||
|
}
|