Closed
Description
Discovered this while debugging #83340. Repro:
fn main() {
println!("{}\
");
}
Current output:
--> test.rs:2:15
|
2 | println!("{}\
| _______________^
3 | | ");
| |_
I think the span for {}
is wrong. With the correct span the error would look like:
error: 1 positional argument in format string, but no arguments were given
--> test.rs:2:15
|
2 | println!("{}\
| ^^
3 | ");
The span is correct when {}
is followed by any other character:
fn main() {
println!("{}
");
}
Output:
error: 1 positional argument in format string, but no arguments were given
--> test.rs:2:15
|
2 | println!("{}
| ^^
error: aborting due to previous error
Metadata
Metadata
Assignees
Labels
No labels