#![allow(non_camel_case_types)]
use middle::def;
-use middle::freevars;
use middle::ty;
use middle::typeck;
use util::nodemap::{DefIdMap, NodeMap};
fn temporary_scope(&self, rvalue_id: ast::NodeId) -> Option<ast::NodeId>;
fn upvar_borrow(&self, upvar_id: ty::UpvarId) -> ty::UpvarBorrow;
fn capture_mode(&self, closure_expr_id: ast::NodeId)
- -> freevars::CaptureMode;
+ -> ast::CaptureClause;
fn unboxed_closures<'a>(&'a self)
-> &'a RefCell<DefIdMap<ty::UnboxedClosure>>;
}
Some(adjustment) => {
match *adjustment {
- ty::AutoAddEnv(..) => {
+ ty::AdjustAddEnv(..) => {
// Convert a bare fn to a closure by adding NULL env.
// Result is an rvalue.
let expr_ty = if_ok!(self.expr_ty_adjusted(expr));
Ok(self.cat_rvalue_node(expr.id(), expr.span(), expr_ty))
}
- ty::AutoDerefRef(
+ ty::AdjustDerefRef(
ty::AutoDerefRef {
autoref: Some(_), ..}) => {
// Equivalent to &*expr or something similar.
Ok(self.cat_rvalue_node(expr.id(), expr.span(), expr_ty))
}
- ty::AutoDerefRef(
+ ty::AdjustDerefRef(
ty::AutoDerefRef {
autoref: None, autoderefs: autoderefs}) => {
// Equivalent to *expr or something similar.
ast::ExprAssign(..) | ast::ExprAssignOp(..) |
ast::ExprFnBlock(..) | ast::ExprProc(..) |
ast::ExprUnboxedFn(..) | ast::ExprRet(..) |
- ast::ExprUnary(..) |
+ ast::ExprUnary(..) | ast::ExprSlice(..) |
ast::ExprMethodCall(..) | ast::ExprCast(..) |
ast::ExprVec(..) | ast::ExprTup(..) | ast::ExprIf(..) |
ast::ExprBinary(..) | ast::ExprWhile(..) |
}))
}
- def::DefUpvar(var_id, _, fn_node_id, _) => {
+ def::DefUpvar(var_id, fn_node_id, _) => {
let ty = if_ok!(self.node_ty(fn_node_id));
match ty::get(ty).sty {
ty::ty_closure(ref closure_ty) => {