diff options
| author | bors <bors@rust-lang.org> | 2013-09-13 21:06:02 -0700 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2013-09-13 21:06:02 -0700 |
| commit | 52b9688f923f8fb5bd6547bc6f2dd2d340c4ee4d (patch) | |
| tree | fe601e5c76affeac69014fd56a820259454057c7 /src/libsyntax | |
| parent | a241deb97931b7c993e88c600d2b35912730a7e8 (diff) | |
| parent | c62919f6074c1ddf766139e5d484fbd7c6f899e1 (diff) | |
| download | rust-52b9688f923f8fb5bd6547bc6f2dd2d340c4ee4d.tar.gz rust-52b9688f923f8fb5bd6547bc6f2dd2d340c4ee4d.zip | |
auto merge of #9176 : brson/rust/issue-9129, r=catamorphism
Servo is hitting this problem, so this is a workaround for lack of a real solution. No tests because I couldn't actually reproduce the problem with either of the testcases in #9129
Diffstat (limited to 'src/libsyntax')
| -rw-r--r-- | src/libsyntax/fold.rs | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/libsyntax/fold.rs b/src/libsyntax/fold.rs index c861c26b82e..5472c61a155 100644 --- a/src/libsyntax/fold.rs +++ b/src/libsyntax/fold.rs @@ -690,11 +690,19 @@ pub fn noop_fold_expr(e: &Expr_, fld: @ast_fold) -> Expr_ { ExprBreak(ref opt_ident) => { // FIXME #6993: add fold_name to fold.... then cut out the // bogus Name->Ident->Name conversion. - ExprBreak(opt_ident.map_move(|x| fld.fold_ident(Ident::new(x)).name)) + ExprBreak(opt_ident.map_move(|x| { + // FIXME #9129: Assigning the new ident to a temporary to work around codegen bug + let newx = Ident::new(x); + fld.fold_ident(newx).name + })) } ExprAgain(ref opt_ident) => { // FIXME #6993: add fold_name to fold.... - ExprAgain(opt_ident.map_move(|x| fld.fold_ident(Ident::new(x)).name)) + ExprAgain(opt_ident.map_move(|x| { + // FIXME #9129: Assigning the new ident to a temporary to work around codegen bug + let newx = Ident::new(x); + fld.fold_ident(newx).name + })) } ExprRet(ref e) => { ExprRet(e.map_move(|x| fld.fold_expr(x))) |
