diff options
| author | Mazdak Farrokhzad <twingoow@gmail.com> | 2020-01-11 12:36:15 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-01-11 12:36:15 +0100 |
| commit | 4eee796679bd13e0935c16f41a5e6e2ab0d5c018 (patch) | |
| tree | fc35ad7fae01337e6873d43c00087dd53c3992db /src/librustc_parse/parser/expr.rs | |
| parent | 50d76d647191bdff875e854ed2ee2282ab274a09 (diff) | |
| parent | 883932c6baf7acd28ab712b80ddeda960f6e37da (diff) | |
| download | rust-4eee796679bd13e0935c16f41a5e6e2ab0d5c018.tar.gz rust-4eee796679bd13e0935c16f41a5e6e2ab0d5c018.zip | |
Rollup merge of #68120 - Centril:ban-range-to-dotdotdot, r=oli-obk
Ban `...X` pats, harden tests, and improve diagnostics Follow up to https://github.com/rust-lang/rust/pull/67258#issuecomment-565656155 and https://github.com/rust-lang/rust/pull/67258#discussion_r357879932. r? @cramertj @oli-obk
Diffstat (limited to 'src/librustc_parse/parser/expr.rs')
| -rw-r--r-- | src/librustc_parse/parser/expr.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/librustc_parse/parser/expr.rs b/src/librustc_parse/parser/expr.rs index b0c78ad7e4b..dd2b6ab9971 100644 --- a/src/librustc_parse/parser/expr.rs +++ b/src/librustc_parse/parser/expr.rs @@ -1966,7 +1966,7 @@ impl<'a> Parser<'a> { limits: RangeLimits, ) -> PResult<'a, ExprKind> { if end.is_none() && limits == RangeLimits::Closed { - self.error_inclusive_range_with_no_end(self.token.span); + self.error_inclusive_range_with_no_end(self.prev_span); Ok(ExprKind::Err) } else { Ok(ExprKind::Range(start, end, limits)) |
