2024-02-16 20:02:50 +00:00
|
|
|
//@ check-fail
|
2021-01-16 12:46:57 +03:00
|
|
|
|
|
|
|
|
// 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
|
|
|
|
|
}
|