diff options
Diffstat (limited to 'compiler/rustc_expand/src/placeholders.rs')
| -rw-r--r-- | compiler/rustc_expand/src/placeholders.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/compiler/rustc_expand/src/placeholders.rs b/compiler/rustc_expand/src/placeholders.rs index 3dcb20c8c76..2c486a02bdf 100644 --- a/compiler/rustc_expand/src/placeholders.rs +++ b/compiler/rustc_expand/src/placeholders.rs @@ -332,9 +332,9 @@ impl MutVisitor for PlaceholderExpander { } } - fn visit_expr(&mut self, expr: &mut P<ast::Expr>) { + fn visit_expr(&mut self, expr: &mut ast::Expr) { match expr.kind { - ast::ExprKind::MacCall(_) => *expr = self.remove(expr.id).make_expr(), + ast::ExprKind::MacCall(_) => *expr = *self.remove(expr.id).make_expr(), _ => walk_expr(self, expr), } } @@ -399,16 +399,16 @@ impl MutVisitor for PlaceholderExpander { stmts } - fn visit_pat(&mut self, pat: &mut P<ast::Pat>) { + fn visit_pat(&mut self, pat: &mut ast::Pat) { match pat.kind { - ast::PatKind::MacCall(_) => *pat = self.remove(pat.id).make_pat(), + ast::PatKind::MacCall(_) => *pat = *self.remove(pat.id).make_pat(), _ => walk_pat(self, pat), } } - fn visit_ty(&mut self, ty: &mut P<ast::Ty>) { + fn visit_ty(&mut self, ty: &mut ast::Ty) { match ty.kind { - ast::TyKind::MacCall(_) => *ty = self.remove(ty.id).make_ty(), + ast::TyKind::MacCall(_) => *ty = *self.remove(ty.id).make_ty(), _ => walk_ty(self, ty), } } |
