Skip to content

Commit

Permalink
auto merge of #15621 : sfackler/rust/attr-span, r=cmr
Browse files Browse the repository at this point in the history
They used to be one token too long, so you'd see things like
```
rust/rust/test.rs:1:1: 2:2 warning: unused attribute,
rust/rust/test.rs:1 #![foo]
rust/rust/test.rs:2 #![bar]
```
instead of
```
test.rs:1:1: 1:8 warning: unused attribute, #[warn(unused_attribute)] on
by default
test.rs:1 #![foo]
          ^~~~~~~
```
  • Loading branch information
bors committed Jul 13, 2014
2 parents 5d200dd + 52ccab1 commit ad7ef8c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libsyntax/parse/attr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,9 @@ impl<'a> ParserAttr for Parser<'a> {

self.expect(&token::LBRACKET);
let meta_item = self.parse_meta_item();
let hi = self.span.hi;
self.expect(&token::RBRACKET);

let hi = self.span.hi;
(mk_sp(lo, hi), meta_item, style)
}
_ => {
Expand Down

0 comments on commit ad7ef8c

Please sign in to comment.