Skip to content

Commit

Permalink
Auto merge of rust-lang#68735 - JohnTitor:fix-ice-0202, r=estebank
Browse files Browse the repository at this point in the history
Use `next_point` to avoid ICE

Fixes rust-lang#68730

r? @estebank (I think you're familiar with that)
  • Loading branch information
bors committed Feb 3, 2020
2 parents 8f49d46 + 6f5a61b commit 01db581
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
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 01db581

Please sign in to comment.