about summary refs log tree commit diff
path: root/src/libsyntax
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2014-07-30 05:06:41 +0000
committerbors <bors@rust-lang.org>2014-07-30 05:06:41 +0000
commit1b0dc6a3fc22b299152e7a29d98896cca7fd6fa2 (patch)
treecb3e627709c7fc8e956689b296dcea720665be2f /src/libsyntax
parent5ebf4813a6503d5312f457b8a6ba7b6998a45f2b (diff)
parentf91a964ef18cb3242e2b7e9c04f788e21377a859 (diff)
downloadrust-1b0dc6a3fc22b299152e7a29d98896cca7fd6fa2.tar.gz
rust-1b0dc6a3fc22b299152e7a29d98896cca7fd6fa2.zip
auto merge of #16092 : alexcrichton/rust/rollup, r=alexcrichton
Diffstat (limited to 'src/libsyntax')
-rw-r--r--src/libsyntax/ext/expand.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/libsyntax/ext/expand.rs b/src/libsyntax/ext/expand.rs
index f82796b480a..a51a79b6d58 100644
--- a/src/libsyntax/ext/expand.rs
+++ b/src/libsyntax/ext/expand.rs
@@ -536,13 +536,16 @@ fn expand_non_macro_stmt(s: &Stmt, fld: &mut MacroExpander)
                 } => {
                     // take it apart:
                     let Local {
-                        ty: _,
+                        ty: ty,
                         pat: pat,
                         init: init,
                         id: id,
                         span: span,
                         source: source,
                     } = **local;
+                    // expand the ty since TyFixedLengthVec contains an Expr
+                    // and thus may have a macro use
+                    let expanded_ty = fld.fold_ty(ty);
                     // expand the pat (it might contain macro uses):
                     let expanded_pat = fld.fold_pat(pat);
                     // find the PatIdents in the pattern:
@@ -566,7 +569,7 @@ fn expand_non_macro_stmt(s: &Stmt, fld: &mut MacroExpander)
                     let new_init_opt = init.map(|e| fld.fold_expr(e));
                     let rewritten_local =
                         box(GC) Local {
-                            ty: local.ty,
+                            ty: expanded_ty,
                             pat: rewritten_pat,
                             init: new_init_opt,
                             id: id,