@@ -493,13 +493,14 @@ fn expand_non_macro_stmt(s: &Stmt, fld: &mut MacroExpander)
493
493
let mut name_finder = new_name_finder ( ~[ ] ) ;
494
494
name_finder. visit_pat ( expanded_pat, ( ) ) ;
495
495
// generate fresh names, push them to a new pending list
496
- let new_pending_renames = @ mut ~[ ] ;
496
+ let mut new_pending_renames = ~[ ] ;
497
497
for ident in name_finder. ident_accumulator . iter ( ) {
498
498
let new_name = fresh_name ( ident) ;
499
499
new_pending_renames. push ( ( * ident, new_name) ) ;
500
500
}
501
501
let rewritten_pat = {
502
- let mut rename_fld = renames_to_fold ( new_pending_renames) ;
502
+ let mut rename_fld =
503
+ renames_to_fold ( & mut new_pending_renames) ;
503
504
// rewrite the pattern using the new names (the old ones
504
505
// have already been applied):
505
506
rename_fld. fold_pat ( expanded_pat)
@@ -981,21 +982,6 @@ impl CtxtFn for Renamer {
981
982
}
982
983
}
983
984
984
- // a renamer that performs a whole bunch of renames
985
- pub struct MultiRenamer {
986
- renames : @mut ~[ ( ast:: Ident , ast:: Name ) ]
987
- }
988
-
989
- impl CtxtFn for MultiRenamer {
990
- fn f ( & self , starting_ctxt : ast:: SyntaxContext ) -> ast:: SyntaxContext {
991
- // the individual elements are memoized... it would
992
- // also be possible to memoize on the whole list at once.
993
- self . renames . iter ( ) . fold ( starting_ctxt, |ctxt, & ( from, to) | {
994
- new_rename ( from, to, ctxt)
995
- } )
996
- }
997
- }
998
-
999
985
// a marker adds the given mark to the syntax context
1000
986
pub struct Marker { mark : Mrk }
1001
987
0 commit comments