libsyntax: De-`@mut` (and de-`@`) the AST mapping context

This commit is contained in:
Patrick Walton 2013-12-27 16:16:46 -08:00
parent acdc998737
commit 9d6f8cdefa
1 changed files with 4 additions and 4 deletions

View File

@ -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 {