Skip to content

Commit

Permalink
Correct span for self and ExprStruct
Browse files Browse the repository at this point in the history
  • Loading branch information
sanxiyn committed Feb 11, 2014
1 parent fd4979a commit f3b5ec2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/libsyntax/parse/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1799,7 +1799,7 @@ impl Parser {
} else if self.eat_keyword(keywords::Self) {
let path = ast_util::ident_to_path(mk_sp(lo, hi), special_idents::self_);
ex = ExprPath(path);
hi = self.span.hi;
hi = self.last_span.hi;
} else if self.eat_keyword(keywords::If) {
return self.parse_if_expr();
} else if self.eat_keyword(keywords::For) {
Expand Down Expand Up @@ -1934,7 +1934,7 @@ impl Parser {
&[token::COMMA], &[token::RBRACE]);
}

hi = pth.span.hi;
hi = self.span.hi;
self.expect(&token::RBRACE);
ex = ExprStruct(pth, fields, base);
return self.mk_expr(lo, hi, ex);
Expand Down

5 comments on commit f3b5ec2

@bors
Copy link
Contributor

@bors bors commented on f3b5ec2 Feb 11, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

saw approval from alexcrichton
at sanxiyn@f3b5ec2

@bors
Copy link
Contributor

@bors bors commented on f3b5ec2 Feb 11, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merging sanxiyn/rust/accurate-span-4 = f3b5ec2 into auto

@bors
Copy link
Contributor

@bors bors commented on f3b5ec2 Feb 11, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sanxiyn/rust/accurate-span-4 = f3b5ec2 merged ok, testing candidate = 616e53f

@bors
Copy link
Contributor

@bors bors commented on f3b5ec2 Feb 11, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bors
Copy link
Contributor

@bors bors commented on f3b5ec2 Feb 11, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fast-forwarding master to auto = 616e53f

Please sign in to comment.