Skip to content

Commit

Permalink
StructField span should include pub
Browse files Browse the repository at this point in the history
  • Loading branch information
chellmuth committed Jun 7, 2015
1 parent dc1e79b commit a722838
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/libsyntax/parse/parser.rs
Expand Up @@ -3395,7 +3395,10 @@ impl<'a> Parser<'a> {
/// Parse a structure field
fn parse_name_and_ty(&mut self, pr: Visibility,
attrs: Vec<Attribute> ) -> PResult<StructField> {
let lo = self.span.lo;
let lo = match pr {
Inherited => self.span.lo,
Public => self.last_span.lo,
};
if !self.token.is_plain_ident() {
return Err(self.fatal("expected ident"));
}
Expand Down

0 comments on commit a722838

Please sign in to comment.