diff options
| author | Marvin Löbel <loebel.marvin@gmail.com> | 2015-11-15 17:17:50 +0100 |
|---|---|---|
| committer | Marvin Löbel <loebel.marvin@gmail.com> | 2015-11-26 21:46:12 +0100 |
| commit | f0beba0217ad4ac748e93f7ea8d16c3b1fc4db1d (patch) | |
| tree | 2a4fd2d32a7e5c6a3943ca3fae4c967fe58b5e4c /src/libsyntax/fold.rs | |
| parent | 2a8f358de7ee71934b8129dff5d908730454d7b1 (diff) | |
| download | rust-f0beba0217ad4ac748e93f7ea8d16c3b1fc4db1d.tar.gz rust-f0beba0217ad4ac748e93f7ea8d16c3b1fc4db1d.zip | |
Moved and refactored ThinAttributes
Diffstat (limited to 'src/libsyntax/fold.rs')
| -rw-r--r-- | src/libsyntax/fold.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/libsyntax/fold.rs b/src/libsyntax/fold.rs index 1d499bce3c6..0cb9f2205be 100644 --- a/src/libsyntax/fold.rs +++ b/src/libsyntax/fold.rs @@ -20,6 +20,7 @@ use ast::*; use ast; +use attr::ThinAttributesExt; use ast_util; use codemap::{respan, Span, Spanned}; use owned_slice::OwnedSlice; @@ -522,7 +523,7 @@ pub fn noop_fold_local<T: Folder>(l: P<Local>, fld: &mut T) -> P<Local> { pat: fld.fold_pat(pat), init: init.map(|e| fld.fold_expr(e)), span: fld.new_span(span), - attrs: attrs.map_opt_attrs(|v| fold_attrs(v, fld)), + attrs: attrs.map_thin_attrs(|v| fold_attrs(v, fld)), }) } @@ -1339,7 +1340,7 @@ pub fn noop_fold_expr<T: Folder>(Expr {id, node, span, attrs}: Expr, folder: &mu ExprParen(ex) => ExprParen(folder.fold_expr(ex)) }, span: folder.new_span(span), - attrs: attrs.map_opt_attrs(|v| fold_attrs(v, folder)), + attrs: attrs.map_thin_attrs(|v| fold_attrs(v, folder)), } } @@ -1388,7 +1389,7 @@ pub fn noop_fold_stmt<T: Folder>(Spanned {node, span}: Stmt, folder: &mut T) StmtMac(mac, semi, attrs) => SmallVector::one(P(Spanned { node: StmtMac(mac.map(|m| folder.fold_mac(m)), semi, - attrs.map_opt_attrs(|v| fold_attrs(v, folder))), + attrs.map_thin_attrs(|v| fold_attrs(v, folder))), span: span })) } |
