diff options
Diffstat (limited to 'src/libsyntax/parse')
| -rw-r--r-- | src/libsyntax/parse/attr.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libsyntax/parse/attr.rs b/src/libsyntax/parse/attr.rs index 80ee459a62d..ef0004d6ee0 100644 --- a/src/libsyntax/parse/attr.rs +++ b/src/libsyntax/parse/attr.rs @@ -9,7 +9,7 @@ // except according to those terms. use ast; -use codemap::{spanned, Spanned, mk_sp}; +use codemap::{spanned, Spanned, mk_sp, Span}; use parse::common::*; //resolve bug? use parse::token; use parse::parser::Parser; @@ -129,10 +129,10 @@ impl<'a> ParserAttr for Parser<'a> { self.parse_attribute(true) } token::DOC_COMMENT(s) => { + // we need to get the position of this token before we bump. + let Span { lo, hi, .. } = self.span; self.bump(); - ::attr::mk_sugared_doc_attr(self.id_to_interned_str(s), - self.span.lo, - self.span.hi) + ::attr::mk_sugared_doc_attr(self.id_to_interned_str(s), lo, hi) } _ => { break; |
