Do not ICE on unicode next point
Use `shrink_to_hi` instead of `next_point` Fix #68000.
This commit is contained in:
parent
72b2bd55ed
commit
fcd850fc5d
3 changed files with 24 additions and 1 deletions
|
|
@ -1489,7 +1489,7 @@ impl<'a> Parser<'a> {
|
|||
}
|
||||
}
|
||||
_ => {
|
||||
let sp = self.sess.source_map().next_point(self.prev_span);
|
||||
let sp = self.prev_span.shrink_to_hi();
|
||||
let mut err = self.struct_span_err(
|
||||
sp,
|
||||
&format!("expected `,`, or `}}`, found {}", super::token_descr(&self.token)),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue