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).

This commit is contained in:
Nick Cameron 2014-01-09 20:12:23 +13:00
parent 7613b15fdb
commit 01f42eed80
1 changed files with 2 additions and 1 deletions

View File

@ -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 {