]> git.lizzy.rs Git - rust.git/blobdiff - src/libsyntax/ext/expand.rs
Remove AttrId from Attribute constructors
[rust.git] / src / libsyntax / ext / expand.rs
index 10d5da81ceef3ccb0ba5d073f827ea5cf088a77c..1e9e16d72f8297dab1add89b8c4d60b2918ff2cc 100644 (file)
@@ -1340,10 +1340,14 @@ fn visit_attribute(&mut self, at: &mut ast::Attribute) {
             }
 
             let meta = attr::mk_list_item(DUMMY_SP, Ident::with_empty_ctxt(sym::doc), items);
-            match at.style {
-                ast::AttrStyle::Inner => *at = attr::mk_attr_inner(at.span, at.id, meta),
-                ast::AttrStyle::Outer => *at = attr::mk_attr_outer(at.span, at.id, meta),
-            }
+            *at = attr::Attribute {
+                span: at.span,
+                id: at.id,
+                style: at.style,
+                path: meta.path,
+                tokens: meta.node.tokens(meta.span),
+                is_sugared_doc: false,
+            };
         } else {
             noop_visit_attribute(at, self)
         }