Skip to content

Commit

Permalink
Use next_point to avoid ICE
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnTitor committed Feb 1, 2020
1 parent 6c0b779 commit 6f5a61b
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/librustc_parse/parser/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
Binary file added src/test/ui/parser/issue-68730.rs
Binary file not shown.
Binary file added src/test/ui/parser/issue-68730.stderr
Binary file not shown.

0 comments on commit 6f5a61b

Please sign in to comment.