diff options
| author | bors <bors@rust-lang.org> | 2020-02-03 00:04:16 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2020-02-03 00:04:16 +0000 |
| commit | 01db5819429352c4ab58f4760c29d6e4ca76d9a7 (patch) | |
| tree | 23b0002986807471a355c4a70a5bd9d0d100221d | |
| parent | 8f49d4629711986a59b1627f6390150324af162c (diff) | |
| parent | 6f5a61b5fb66987a32c25e3877f4f99e37ff067d (diff) | |
| download | rust-01db5819429352c4ab58f4760c29d6e4ca76d9a7.tar.gz rust-01db5819429352c4ab58f4760c29d6e4ca76d9a7.zip | |
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)
| -rw-r--r-- | src/librustc_parse/parser/mod.rs | 4 | ||||
| -rw-r--r-- | src/test/ui/parser/issue-68730.rs | bin | 0 -> 170 bytes | |||
| -rw-r--r-- | src/test/ui/parser/issue-68730.stderr | bin | 0 -> 957 bytes |
3 files changed, 2 insertions, 2 deletions
diff --git a/src/librustc_parse/parser/mod.rs b/src/librustc_parse/parser/mod.rs index 1e28372c384..8c1839da1cb 100644 --- a/src/librustc_parse/parser/mod.rs +++ b/src/librustc_parse/parser/mod.rs @@ -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 } diff --git a/src/test/ui/parser/issue-68730.rs b/src/test/ui/parser/issue-68730.rs new file mode 100644 index 00000000000..b570e941775 --- /dev/null +++ b/src/test/ui/parser/issue-68730.rs Binary files differdiff --git a/src/test/ui/parser/issue-68730.stderr b/src/test/ui/parser/issue-68730.stderr new file mode 100644 index 00000000000..5f9ed56e2d7 --- /dev/null +++ b/src/test/ui/parser/issue-68730.stderr Binary files differ |
