Skip to content

Commit ad7ef8c

Browse files
committed
auto merge of #15621 : sfackler/rust/attr-span, r=cmr
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] ^~~~~~~ ```
2 parents 5d200dd + 52ccab1 commit ad7ef8c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libsyntax/parse/attr.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,9 @@ impl<'a> ParserAttr for Parser<'a> {
8585

8686
self.expect(&token::LBRACKET);
8787
let meta_item = self.parse_meta_item();
88+
let hi = self.span.hi;
8889
self.expect(&token::RBRACKET);
8990

90-
let hi = self.span.hi;
9191
(mk_sp(lo, hi), meta_item, style)
9292
}
9393
_ => {

0 commit comments

Comments
 (0)