Skip to content

Commit 871797d

Browse files
committed
---
yaml --- r: 147943 b: refs/heads/try2 c: 901df8a h: refs/heads/master i: 147941: 7c7ad01 147939: 873fe4e 147935: 0373e58 v: v3
1 parent d6556ba commit 871797d

File tree

2 files changed

+4
-18
lines changed

2 files changed

+4
-18
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
55
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: 1d29163e9c12a56d5401325f2d0d51c3e825ff72
8+
refs/heads/try2: 901df8a63bc089f0805ce4fd61fbf22d0f2e2166
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/src/libsyntax/ext/expand.rs

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -493,13 +493,14 @@ fn expand_non_macro_stmt(s: &Stmt, fld: &mut MacroExpander)
493493
let mut name_finder = new_name_finder(~[]);
494494
name_finder.visit_pat(expanded_pat,());
495495
// generate fresh names, push them to a new pending list
496-
let new_pending_renames = @mut ~[];
496+
let mut new_pending_renames = ~[];
497497
for ident in name_finder.ident_accumulator.iter() {
498498
let new_name = fresh_name(ident);
499499
new_pending_renames.push((*ident,new_name));
500500
}
501501
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);
503504
// rewrite the pattern using the new names (the old ones
504505
// have already been applied):
505506
rename_fld.fold_pat(expanded_pat)
@@ -981,21 +982,6 @@ impl CtxtFn for Renamer {
981982
}
982983
}
983984

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-
999985
// a marker adds the given mark to the syntax context
1000986
pub struct Marker { mark : Mrk }
1001987

0 commit comments

Comments
 (0)