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:
parent
7613b15fdb
commit
01f42eed80
1 changed files with 2 additions and 1 deletions
|
@ -4925,6 +4925,7 @@ impl Parser {
|
||||||
token::EQ => {
|
token::EQ => {
|
||||||
// x = foo::bar
|
// x = foo::bar
|
||||||
self.bump();
|
self.bump();
|
||||||
|
let path_lo = self.span.lo;
|
||||||
path = ~[self.parse_ident()];
|
path = ~[self.parse_ident()];
|
||||||
while self.token == token::MOD_SEP {
|
while self.token == token::MOD_SEP {
|
||||||
self.bump();
|
self.bump();
|
||||||
|
@ -4932,7 +4933,7 @@ impl Parser {
|
||||||
path.push(id);
|
path.push(id);
|
||||||
}
|
}
|
||||||
let path = ast::Path {
|
let path = ast::Path {
|
||||||
span: mk_sp(lo, self.span.hi),
|
span: mk_sp(path_lo, self.span.hi),
|
||||||
global: false,
|
global: false,
|
||||||
segments: path.move_iter().map(|identifier| {
|
segments: path.move_iter().map(|identifier| {
|
||||||
ast::PathSegment {
|
ast::PathSegment {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue