diff options
| author | Jeffrey Seyfried <jeffrey.seyfried@gmail.com> | 2016-11-14 12:00:25 +0000 |
|---|---|---|
| committer | Jeffrey Seyfried <jeffrey.seyfried@gmail.com> | 2016-11-20 11:46:00 +0000 |
| commit | 3ea2bc4e935e273268f3f6d8de45a27042dc5e48 (patch) | |
| tree | 4def39226f97e50bebf099a93857735bc3c77bb1 /src/libsyntax/fold.rs | |
| parent | bfa709a38a8c607e1c13ee5635fbfd1940eb18b1 (diff) | |
| download | rust-3ea2bc4e935e273268f3f6d8de45a27042dc5e48.tar.gz rust-3ea2bc4e935e273268f3f6d8de45a27042dc5e48.zip | |
Refactor away `ast::Attribute_`.
Diffstat (limited to 'src/libsyntax/fold.rs')
| -rw-r--r-- | src/libsyntax/fold.rs | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/src/libsyntax/fold.rs b/src/libsyntax/fold.rs index 2e62f23578d..aac99e4e513 100644 --- a/src/libsyntax/fold.rs +++ b/src/libsyntax/fold.rs @@ -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), }) } |
