diff options
| author | bors <bors@rust-lang.org> | 2021-02-02 12:02:36 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2021-02-02 12:02:36 +0000 |
| commit | a3ed564c130ec3f19e933a9ea31faca5a717ce91 (patch) | |
| tree | e5f20eba8577b1117e208b06ab7872ed3e8dcfca /compiler/rustc_parse/src | |
| parent | f6cb45ad01a4518f615926f39801996622f46179 (diff) | |
| parent | 73f859e912bb9ab60cef84e2d79ad2353691b9f0 (diff) | |
| download | rust-a3ed564c130ec3f19e933a9ea31faca5a717ce91.tar.gz rust-a3ed564c130ec3f19e933a9ea31faca5a717ce91.zip | |
Auto merge of #81660 - jonas-schievink:rollup-fz2lh78, r=jonas-schievink
Rollup of 11 pull requests Successful merges: - #80629 (Add lint for 2229 migrations) - #81022 (Add Frames Iterator for Backtrace) - #81481 (move some tests) - #81485 (Add some tests for associated-type-bounds issues) - #81492 (rustdoc: Note why `rustdoc::html::markdown` is public) - #81577 (const_evaluatable: consider sub-expressions to be evaluatable) - #81599 (Implement `TrustedLen` for `Fuse<I: TrustedLen>`) - #81608 (Improve handling of spans around macro result parse errors) - #81609 (Remove the remains of query categories) - #81630 (Fix overflowing text on mobile when sidebar is displayed) - #81631 (Remove unneeded `mut` variable) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_parse/src')
| -rw-r--r-- | compiler/rustc_parse/src/parser/diagnostics.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_parse/src/parser/diagnostics.rs b/compiler/rustc_parse/src/parser/diagnostics.rs index f2fcce5c226..5512e849c45 100644 --- a/compiler/rustc_parse/src/parser/diagnostics.rs +++ b/compiler/rustc_parse/src/parser/diagnostics.rs @@ -1104,7 +1104,7 @@ impl<'a> Parser<'a> { let (prev_sp, sp) = match (&self.token.kind, self.subparser_name) { // Point at the end of the macro call when reaching end of macro arguments. (token::Eof, Some(_)) => { - let sp = self.sess.source_map().next_point(self.token.span); + let sp = self.sess.source_map().next_point(self.prev_token.span); (sp, sp) } // We don't want to point at the following span after DUMMY_SP. @@ -1721,7 +1721,7 @@ impl<'a> Parser<'a> { pub(super) fn expected_expression_found(&self) -> DiagnosticBuilder<'a> { let (span, msg) = match (&self.token.kind, self.subparser_name) { (&token::Eof, Some(origin)) => { - let sp = self.sess.source_map().next_point(self.token.span); + let sp = self.sess.source_map().next_point(self.prev_token.span); (sp, format!("expected expression, found end of {}", origin)) } _ => ( |
