Closed
Description
When reporting the span for the error it chooses the previous line. This is quite confusing. The error here is that the '\U...'
syntax takes exaclty 8 hex digits and 7 are provided.
This test program:
fn main() {
let c = 'a';
match c {
'a' => (),
'b' => (),
'\U0123456' => ()
}
}
produces this output from rustc
$ rustc badspan.rs
badspan.rs:5:17: 5:18 error: illegal numeric character escape: 39
badspan.rs:5 'b' => (),
^
Metadata
Metadata
Assignees
Labels
No labels