Skip to content

Commit 01f42ee

Browse files
committed
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).
1 parent 7613b15 commit 01f42ee

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/libsyntax/parse/parser.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4925,14 +4925,15 @@ impl Parser {
49254925
token::EQ => {
49264926
// x = foo::bar
49274927
self.bump();
4928+
let path_lo = self.span.lo;
49284929
path = ~[self.parse_ident()];
49294930
while self.token == token::MOD_SEP {
49304931
self.bump();
49314932
let id = self.parse_ident();
49324933
path.push(id);
49334934
}
49344935
let path = ast::Path {
4935-
span: mk_sp(lo, self.span.hi),
4936+
span: mk_sp(path_lo, self.span.hi),
49364937
global: false,
49374938
segments: path.move_iter().map(|identifier| {
49384939
ast::PathSegment {

0 commit comments

Comments
 (0)