mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-28 02:57:37 +00:00
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] ^~~~~~~ ```
This commit is contained in:
commit
ad7ef8c27c
@ -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)
|
||||
}
|
||||
_ => {
|
||||
|
Loading…
Reference in New Issue
Block a user