diff options
Diffstat (limited to 'src/libsyntax')
| -rw-r--r-- | src/libsyntax/ast_map.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libsyntax/ast_map.rs b/src/libsyntax/ast_map.rs index 05fdfb36ca5..fd34091cc51 100644 --- a/src/libsyntax/ast_map.rs +++ b/src/libsyntax/ast_map.rs @@ -456,12 +456,12 @@ impl Visitor<()> for Ctx { } pub fn map_crate(diag: @SpanHandler, c: &Crate) -> map { - let cx = @mut Ctx { + let mut cx = Ctx { map: @RefCell::new(HashMap::new()), path: RefCell::new(~[]), diag: diag, }; - visit::walk_crate(cx, c, ()); + visit::walk_crate(&mut cx, c, ()); cx.map } @@ -475,7 +475,7 @@ pub fn map_decoded_item(diag: @SpanHandler, // I believe it is ok for the local IDs of inlined items from other crates // to overlap with the local ids from this crate, so just generate the ids // starting from 0. - let cx = @mut Ctx { + let mut cx = Ctx { map: map, path: RefCell::new(path.clone()), diag: diag, @@ -499,7 +499,7 @@ pub fn map_decoded_item(diag: @SpanHandler, } // visit the item / method contents and add those to the map: - ii.accept((), cx); + ii.accept((), &mut cx); } pub fn node_id_to_str(map: map, id: NodeId, itr: @ident_interner) -> ~str { |
