Skip to content

Commit 01db581

Browse files
committed
Auto merge of #68735 - JohnTitor:fix-ice-0202, r=estebank
Use `next_point` to avoid ICE Fixes #68730 r? @estebank (I think you're familiar with that)
2 parents 8f49d46 + 6f5a61b commit 01db581

File tree

3 files changed

+2
-2
lines changed

3 files changed

+2
-2
lines changed

src/librustc_parse/parser/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -671,12 +671,12 @@ impl<'a> Parser<'a> {
671671
true
672672
}
673673
token::BinOp(token::Shl) => {
674-
let span = self.token.span.with_lo(self.token.span.lo() + BytePos(1));
674+
let span = self.sess.source_map().next_point(self.token.span);
675675
self.bump_with(token::Lt, span);
676676
true
677677
}
678678
token::LArrow => {
679-
let span = self.token.span.with_lo(self.token.span.lo() + BytePos(1));
679+
let span = self.sess.source_map().next_point(self.token.span);
680680
self.bump_with(token::BinOp(token::Minus), span);
681681
true
682682
}

src/test/ui/parser/issue-68730.rs

170 Bytes
Binary file not shown.

src/test/ui/parser/issue-68730.stderr

957 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)