We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 37bd466 commit d3fde84Copy full SHA for d3fde84
src/libsyntax/parse/attr.rs
@@ -9,7 +9,7 @@
9
// except according to those terms.
10
11
use ast;
12
-use codemap::{spanned, Spanned, mk_sp};
+use codemap::{spanned, Spanned, mk_sp, Span};
13
use parse::common::*; //resolve bug?
14
use parse::token;
15
use parse::parser::Parser;
@@ -129,10 +129,10 @@ impl<'a> ParserAttr for Parser<'a> {
129
self.parse_attribute(true)
130
}
131
token::DOC_COMMENT(s) => {
132
+ // we need to get the position of this token before we bump.
133
+ let Span { lo, hi, .. } = self.span;
134
self.bump();
- ::attr::mk_sugared_doc_attr(self.id_to_interned_str(s),
- self.span.lo,
135
- self.span.hi)
+ ::attr::mk_sugared_doc_attr(self.id_to_interned_str(s), lo, hi)
136
137
_ => {
138
break;
0 commit comments