mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-30 10:45:18 +00:00
11 lines
355 B
Rust
11 lines
355 B
Rust
// check-fail
|
|
|
|
// First format below would cause a panic, second would generate error with incorrect span
|
|
|
|
fn main() {
|
|
let _ = format!("→{}→\n");
|
|
//~^ ERROR 1 positional argument in format string, but no arguments were given
|
|
let _ = format!("→{} \n");
|
|
//~^ ERROR 1 positional argument in format string, but no arguments were given
|
|
}
|