about summary refs log tree commit diff
path: root/src/libsyntax/parse/parser.rs
diff options
context:
space:
mode:
authorOliver Schneider <git-spam-no-reply9815368754983@oli-obk.de>2017-03-27 13:59:10 +0200
committerOliver Schneider <git-spam-no-reply9815368754983@oli-obk.de>2017-04-25 11:04:35 +0200
commitb857a1a39fc29b8f241d8aa4c859ff4105cb160c (patch)
tree8d8d435316f5213a682b3aecdffb9ef07aacc520 /src/libsyntax/parse/parser.rs
parent0e920fde4f686e2924ea3378ac55d26217b53eaf (diff)
downloadrust-b857a1a39fc29b8f241d8aa4c859ff4105cb160c.tar.gz
rust-b857a1a39fc29b8f241d8aa4c859ff4105cb160c.zip
Update affected tests
Diffstat (limited to 'src/libsyntax/parse/parser.rs')
-rw-r--r--src/libsyntax/parse/parser.rs4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs
index 1baf0d1b54c..53656d8c6c2 100644
--- a/src/libsyntax/parse/parser.rs
+++ b/src/libsyntax/parse/parser.rs
@@ -5122,7 +5122,6 @@ impl<'a> Parser<'a> {
         }
 
         if self.check(&token::OpenDelim(token::Paren)) {
-            let start_span = self.span;
             // We don't `self.bump()` the `(` yet because this might be a struct definition where
             // `()` or a tuple might be allowed. For example, `struct Struct(pub (), pub (usize));`.
             // Because of this, we only `bump` the `(` if we're assured it is appropriate to do so
@@ -5165,8 +5164,7 @@ impl<'a> Parser<'a> {
                                        the path:",
                                        path);
                 self.expect(&token::CloseDelim(token::Paren))?;  // `)`
-                let sp = start_span.to(self.prev_span);
-                let mut err = self.span_fatal_help(sp, &msg, &suggestion);
+                let mut err = self.span_fatal_help(path_span, &msg, &suggestion);
                 err.span_suggestion(path_span, &help_msg, format!("in {}", path));
                 err.emit();  // emit diagnostic, but continue with public visibility
             }