From eacb629442e0e0869c6e230671afdeb8d002eefb Mon Sep 17 00:00:00 2001 From: Marijn Haverbeke Date: Thu, 22 Dec 2011 20:38:09 +0100 Subject: [PATCH] Work around unwinding bug See issue #1374 --- src/comp/syntax/fold.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/comp/syntax/fold.rs b/src/comp/syntax/fold.rs index 9d75c24e122..0c136819ce9 100644 --- a/src/comp/syntax/fold.rs +++ b/src/comp/syntax/fold.rs @@ -229,7 +229,8 @@ fn noop_fold_item_underscore(i: item_, fld: ast_fold) -> item_ { ret alt i { item_const(t, e) { item_const(fld.fold_ty(t), fld.fold_expr(e)) } item_fn(decl, typms, body) { - item_fn(fold_fn_decl(decl, fld), typms, fld.fold_block(body)) + let body = fld.fold_block(body); + item_fn(fold_fn_decl(decl, fld), typms, body) } item_mod(m) { item_mod(fld.fold_mod(m)) } item_native_mod(nm) { item_native_mod(fld.fold_native_mod(nm)) }