about summary refs log tree commit diff
path: root/src/libsyntax/parse
diff options
context:
space:
mode:
authorNick Cameron <ncameron@mozilla.com>2014-01-09 20:12:23 +1300
committerNick Cameron <ncameron@mozilla.com>2014-01-09 20:12:23 +1300
commit01f42eed803e7e01bb27be17461d0cc8f0643a70 (patch)
tree39a1354bba62627427520c577efc52e43456b7ae /src/libsyntax/parse
parent7613b15fdbbb9bf770a2c731f4135886b0ff3cf0 (diff)
downloadrust-01f42eed803e7e01bb27be17461d0cc8f0643a70.tar.gz
rust-01f42eed803e7e01bb27be17461d0cc8f0643a70.zip
Start the span for a path in a view_path at the correct place (at the start of the path, rather than at the start of the view_path).
Diffstat (limited to 'src/libsyntax/parse')
-rw-r--r--src/libsyntax/parse/parser.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs
index 60866e92efa..26653fe4a1e 100644
--- a/src/libsyntax/parse/parser.rs
+++ b/src/libsyntax/parse/parser.rs
@@ -4925,6 +4925,7 @@ impl Parser {
           token::EQ => {
             // x = foo::bar
             self.bump();
+            let path_lo = self.span.lo;
             path = ~[self.parse_ident()];
             while self.token == token::MOD_SEP {
                 self.bump();
@@ -4932,7 +4933,7 @@ impl Parser {
                 path.push(id);
             }
             let path = ast::Path {
-                span: mk_sp(lo, self.span.hi),
+                span: mk_sp(path_lo, self.span.hi),
                 global: false,
                 segments: path.move_iter().map(|identifier| {
                     ast::PathSegment {