change type of ExprLoop and ExprBreak elts from ident->name.

Lots of downstream changes in librustc, should be infinitesimally faster.
This commit is contained in:
John Clements
2013-09-10 12:01:44 -07:00
parent 917d3c28b6
commit 422cf1adc5
13 changed files with 37 additions and 27 deletions

View File

@@ -688,10 +688,13 @@ pub fn noop_fold_expr(e: &Expr_, fld: @ast_fold) -> Expr_ {
ExprPath(ref pth) => ExprPath(fld.fold_path(pth)),
ExprSelf => ExprSelf,
ExprBreak(ref opt_ident) => {
ExprBreak(opt_ident.map_move(|x| fld.fold_ident(x)))
// 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))
}
ExprAgain(ref opt_ident) => {
ExprAgain(opt_ident.map_move(|x| fld.fold_ident(x)))
// FIXME #6993: add fold_name to fold....
ExprAgain(opt_ident.map_move(|x| fld.fold_ident(Ident::new(x)).name))
}
ExprRet(ref e) => {
ExprRet(e.map_move(|x| fld.fold_expr(x)))