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

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

12 lines
304 B
Rust
Raw Normal View History

use std::fmt::Write;
fn main() {
println!(0);
//~^ ERROR format argument must be a string literal
eprintln!('a');
//~^ ERROR format argument must be a string literal
let mut s = String::new();
writeln!(s, true).unwrap();
//~^ ERROR format argument must be a string literal
}