Refactor away ast::Attribute_.

This commit is contained in:
Jeffrey Seyfried
2016-11-14 12:00:25 +00:00
parent bfa709a38a
commit 3ea2bc4e93
19 changed files with 85 additions and 93 deletions

View File

@@ -486,16 +486,13 @@ pub fn noop_fold_local<T: Folder>(l: P<Local>, fld: &mut T) -> P<Local> {
})
}
pub fn noop_fold_attribute<T: Folder>(at: Attribute, fld: &mut T) -> Option<Attribute> {
let Spanned {node: Attribute_ {id, style, value, is_sugared_doc}, span} = at;
Some(Spanned {
node: Attribute_ {
id: id,
style: style,
value: fld.fold_meta_item(value),
is_sugared_doc: is_sugared_doc
},
span: fld.new_span(span)
pub fn noop_fold_attribute<T: Folder>(attr: Attribute, fld: &mut T) -> Option<Attribute> {
Some(Attribute {
id: attr.id,
style: attr.style,
value: fld.fold_meta_item(attr.value),
is_sugared_doc: attr.is_sugared_doc,
span: fld.new_span(attr.span),
})
}