From cd4e637ae4113d4c49a2e5c533b5bf48fbf7cc6e Mon Sep 17 00:00:00 2001 From: John Clements Date: Fri, 7 Jun 2013 17:14:06 -0700 Subject: [PATCH] fixed bug in fold's traversal of cast exprs --- src/libsyntax/fold.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libsyntax/fold.rs b/src/libsyntax/fold.rs index f8671623992..85519bd2671 100644 --- a/src/libsyntax/fold.rs +++ b/src/libsyntax/fold.rs @@ -545,7 +545,7 @@ pub fn noop_fold_expr(e: &Expr_, fld: @ast_fold) -> Expr_ { ExprDoBody(f) => ExprDoBody(fld.fold_expr(f)), ExprLit(_) => (*e).clone(), ExprCast(expr, ref ty) => { - ExprCast(fld.fold_expr(expr), (*ty).clone()) + ExprCast(fld.fold_expr(expr), fld.fold_ty(ty)) } ExprAddrOf(m, ohs) => ExprAddrOf(m, fld.fold_expr(ohs)), ExprIf(cond, ref tr, fl) => {