提交 52b9688f 编写于 作者: B bors

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
......@@ -690,11 +690,19 @@ fn fold_field_(field: Field, fld: @ast_fold) -> Field {
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)))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册