about summary refs log tree commit diff
path: root/compiler/rustc_parse/src/parser/expr.rs
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2023-01-29 06:14:20 +0100
committerGitHub <noreply@github.com>2023-01-29 06:14:20 +0100
commit4e8f7e4fc9d7849227f96cd55e46c0337c3fc416 (patch)
tree879e24873d1bd19b282a2168faedfaf933cab8c0 /compiler/rustc_parse/src/parser/expr.rs
parent5ff6cdca7ec664c7f96653e6c028b524757d60c4 (diff)
parentc5688794e2c3bb94f93e37a4f77576ac0d86a14e (diff)
downloadrust-4e8f7e4fc9d7849227f96cd55e46c0337c3fc416.tar.gz
rust-4e8f7e4fc9d7849227f96cd55e46c0337c3fc416.zip
Rollup merge of #107425 - clubby789:match-range-missing-space, r=compiler-errors
Check for missing space between fat arrow and range pattern

Fixes #107420

Ideally we wouldn't emit an error about expecting `=>` etc., but I'm not sure how to recover from this.

`@rustbot` label +A-diagnostics
Diffstat (limited to 'compiler/rustc_parse/src/parser/expr.rs')
-rw-r--r--compiler/rustc_parse/src/parser/expr.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_parse/src/parser/expr.rs b/compiler/rustc_parse/src/parser/expr.rs
index 3225a309a31..17d1e200b41 100644
--- a/compiler/rustc_parse/src/parser/expr.rs
+++ b/compiler/rustc_parse/src/parser/expr.rs
@@ -3168,7 +3168,7 @@ impl<'a> Parser<'a> {
         limits: RangeLimits,
     ) -> ExprKind {
         if end.is_none() && limits == RangeLimits::Closed {
-            self.inclusive_range_with_incorrect_end(self.prev_token.span);
+            self.inclusive_range_with_incorrect_end();
             ExprKind::Err
         } else {
             ExprKind::Range(start, end, limits)