summary refs log tree commit diff
path: root/src/libsyntax/parse
diff options
context:
space:
mode:
authorSteven Fackler <sfackler@gmail.com>2014-05-20 00:07:24 -0700
committerSteven Fackler <sfackler@gmail.com>2014-05-24 16:08:36 -0700
commitc305473d3c60d5b4590ef8c715468f718a7aad8f (patch)
treeb7b35aded387256555005b60a2faa16d9be3ad1f /src/libsyntax/parse
parent6304a27b80f3923a8ffc009418c302aa8b06fb93 (diff)
downloadrust-c305473d3c60d5b4590ef8c715468f718a7aad8f.tar.gz
rust-c305473d3c60d5b4590ef8c715468f718a7aad8f.zip
Add AttrId to Attribute_
Diffstat (limited to 'src/libsyntax/parse')
-rw-r--r--src/libsyntax/parse/attr.rs8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/libsyntax/parse/attr.rs b/src/libsyntax/parse/attr.rs
index 89d1b8f9342..e86dcb3d311 100644
--- a/src/libsyntax/parse/attr.rs
+++ b/src/libsyntax/parse/attr.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use attr;
 use ast;
 use codemap::{spanned, Spanned, mk_sp, Span};
 use parse::common::*; //resolve bug?
@@ -39,6 +40,7 @@ impl<'a> ParserAttr for Parser<'a> {
               }
               token::DOC_COMMENT(s) => {
                 let attr = ::attr::mk_sugared_doc_attr(
+                    attr::mk_attr_id(),
                     self.id_to_interned_str(s),
                     self.span.lo,
                     self.span.hi
@@ -101,6 +103,7 @@ impl<'a> ParserAttr for Parser<'a> {
         return Spanned {
             span: span,
             node: ast::Attribute_ {
+                id: attr::mk_attr_id(),
                 style: style,
                 value: value,
                 is_sugared_doc: false
@@ -132,7 +135,10 @@ impl<'a> ParserAttr for Parser<'a> {
                     // 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), lo, hi)
+                    ::attr::mk_sugared_doc_attr(attr::mk_attr_id(),
+                                                self.id_to_interned_str(s),
+                                                lo,
+                                                hi)
                 }
                 _ => {
                     break;