Make ast_fold take &mut self
This commit is contained in:
parent
933def408c
commit
3965dddf49
10 changed files with 131 additions and 130 deletions
|
@ -908,7 +908,7 @@ struct Duplicator<'a> {
|
|||
}
|
||||
|
||||
impl<'a> ast_fold for Duplicator<'a> {
|
||||
fn new_id(&self, _: NodeId) -> NodeId {
|
||||
fn new_id(&mut self, _: NodeId) -> NodeId {
|
||||
ast::DUMMY_NODE_ID
|
||||
}
|
||||
}
|
||||
|
@ -925,7 +925,7 @@ pub trait Duplicate {
|
|||
|
||||
impl Duplicate for @ast::Expr {
|
||||
fn duplicate(&self, cx: &ExtCtxt) -> @ast::Expr {
|
||||
let folder = Duplicator {
|
||||
let mut folder = Duplicator {
|
||||
cx: cx,
|
||||
};
|
||||
folder.fold_expr(*self)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue