about summary refs log tree commit diff
path: root/src/libsyntax/parse/parser.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2014-01-09 07:41:33 -0800
committerbors <bors@rust-lang.org>2014-01-09 07:41:33 -0800
commitdd11fe17c7cf3661905c952d8233527abbff4c11 (patch)
treebbf489730cd7ce070b8b01bfd58d283b9d4ccf71 /src/libsyntax/parse/parser.rs
parent1b0f5b23fc08ff22dc513c5f333569b7e8b9313d (diff)
parent01f42eed803e7e01bb27be17461d0cc8f0643a70 (diff)
downloadrust-dd11fe17c7cf3661905c952d8233527abbff4c11.tar.gz
rust-dd11fe17c7cf3661905c952d8233527abbff4c11.zip
auto merge of #11414 : nick29581/rust/span, r=alexcrichton
...at the start of the path, rather than at the start of the view_path.

Fixes #11317
Diffstat (limited to 'src/libsyntax/parse/parser.rs')
-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 {