Use next_point
to avoid ICE
This commit is contained in:
parent
6c0b779b7b
commit
6f5a61b5fb
3 changed files with 2 additions and 2 deletions
|
@ -671,12 +671,12 @@ impl<'a> Parser<'a> {
|
|||
true
|
||||
}
|
||||
token::BinOp(token::Shl) => {
|
||||
let span = self.token.span.with_lo(self.token.span.lo() + BytePos(1));
|
||||
let span = self.sess.source_map().next_point(self.token.span);
|
||||
self.bump_with(token::Lt, span);
|
||||
true
|
||||
}
|
||||
token::LArrow => {
|
||||
let span = self.token.span.with_lo(self.token.span.lo() + BytePos(1));
|
||||
let span = self.sess.source_map().next_point(self.token.span);
|
||||
self.bump_with(token::BinOp(token::Minus), span);
|
||||
true
|
||||
}
|
||||
|
|
BIN
src/test/ui/parser/issue-68730.rs
Normal file
BIN
src/test/ui/parser/issue-68730.rs
Normal file
Binary file not shown.
BIN
src/test/ui/parser/issue-68730.stderr
Normal file
BIN
src/test/ui/parser/issue-68730.stderr
Normal file
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue