Add _mutable unop.

This commit is contained in:
Graydon Hoare 2011-02-15 12:20:30 -08:00
parent 2bba49a9fe
commit 9ae89bd404
4 changed files with 14 additions and 0 deletions

View file

@ -1834,6 +1834,9 @@ fn trans_unary(@block_ctxt cx, ast.unop op,
}
ret res(sub.bcx, val);
}
case (ast._mutable) {
ret trans_expr(cx, e);
}
}
fail;
}

View file

@ -1229,6 +1229,9 @@ fn check_expr(&@fn_ctxt fcx, @ast.expr expr) -> @ast.expr {
}
}
}
case (ast._mutable) {
oper_t = @rec(mut=ast.mut with *oper_t);
}
case (_) { oper_t = strip_boxes(oper_t); }
}
ret @fold.respan[ast.expr_](expr.span,