提交 e4b913f6 编写于 作者: N Nick Cameron

s/vtable2/vtable

上级 091b9811
......@@ -88,7 +88,7 @@ trait `ToString` imported, and I call `to_string()` on a value of type `T`,
use middle::typeck::astconv::AstConv;
use middle::typeck::check::{FnCtxt, NoPreference, PreferMutLvalue};
use middle::typeck::check::{impl_self_ty};
use middle::typeck::check::vtable2::select_fcx_obligations_where_possible;
use middle::typeck::check::vtable::select_fcx_obligations_where_possible;
use middle::typeck::check;
use middle::typeck::infer;
use middle::typeck::{MethodCall, MethodCallee};
......
......@@ -139,7 +139,7 @@
use syntax;
pub mod _match;
pub mod vtable2; // New trait code
pub mod vtable;
pub mod writeback;
pub mod regionmanip;
pub mod regionck;
......@@ -409,7 +409,7 @@ fn check_bare_fn(ccx: &CrateCtxt,
let fcx = check_fn(ccx, fn_ty.fn_style, id, &fn_ty.sig,
decl, id, body, &inh);
vtable2::select_all_fcx_obligations_or_error(&fcx);
vtable::select_all_fcx_obligations_or_error(&fcx);
regionck::regionck_fn(&fcx, id, body);
writeback::resolve_type_vars_in_fn(&fcx, decl, body);
}
......@@ -1377,7 +1377,7 @@ fn check_cast(fcx: &FnCtxt,
if ty::type_is_trait(t_1) {
// This will be looked up later on.
vtable2::check_object_cast(fcx, cast_expr, e, t_1);
vtable::check_object_cast(fcx, cast_expr, e, t_1);
fcx.write_ty(id, t_1);
return
}
......@@ -1682,7 +1682,7 @@ fn register_unsize_obligations(&self,
ty::UnsizeVtable(ref ty_trait, self_ty) => {
// If the type is `Foo+'a`, ensures that the type
// being cast to `Foo+'a` implements `Foo`:
vtable2::register_object_cast_obligations(self,
vtable::register_object_cast_obligations(self,
span,
ty_trait,
self_ty);
......@@ -2565,7 +2565,7 @@ fn check_argument_types<'a>(fcx: &FnCtxt,
// an "opportunistic" vtable resolution of any trait
// bounds on the call.
if check_blocks {
vtable2::select_fcx_obligations_where_possible(fcx);
vtable::select_fcx_obligations_where_possible(fcx);
}
// For variadic functions, we don't have a declared type for all of
......@@ -4037,7 +4037,7 @@ fn check_struct_fields_on_error(fcx: &FnCtxt,
ast::ExprForLoop(ref pat, ref head, ref block, _) => {
check_expr(fcx, &**head);
let typ = lookup_method_for_for_loop(fcx, &**head, expr.id);
vtable2::select_fcx_obligations_where_possible(fcx);
vtable::select_fcx_obligations_where_possible(fcx);
let pcx = pat_ctxt {
fcx: fcx,
......@@ -4744,7 +4744,7 @@ pub fn check_const_with_ty(fcx: &FnCtxt,
check_expr_with_hint(fcx, e, declty);
demand::coerce(fcx, e.span, declty, e);
vtable2::select_all_fcx_obligations_or_error(fcx);
vtable::select_all_fcx_obligations_or_error(fcx);
regionck::regionck_expr(fcx, e);
writeback::resolve_type_vars_in_expr(fcx, e);
}
......
......@@ -126,7 +126,7 @@ fn get_i(x: &'a Bar) -> &'a int {
use middle::typeck::astconv::AstConv;
use middle::typeck::check::FnCtxt;
use middle::typeck::check::regionmanip;
use middle::typeck::check::vtable2;
use middle::typeck::check::vtable;
use middle::typeck::infer::resolve_and_force_all_but_regions;
use middle::typeck::infer::resolve_type;
use middle::typeck::infer;
......@@ -172,7 +172,7 @@ pub fn regionck_fn(fcx: &FnCtxt, id: ast::NodeId, blk: &ast::Block) {
// Region checking a fn can introduce new trait obligations,
// particularly around closure bounds.
vtable2::select_all_fcx_obligations_or_error(fcx);
vtable::select_all_fcx_obligations_or_error(fcx);
fcx.infcx().resolve_regions_and_report_errors();
}
......
......@@ -14,7 +14,7 @@
use middle::ty;
use middle::ty_fold::{TypeFolder, TypeFoldable};
use middle::typeck::astconv::AstConv;
use middle::typeck::check::{FnCtxt, Inherited, blank_fn_ctxt, vtable2, regionck};
use middle::typeck::check::{FnCtxt, Inherited, blank_fn_ctxt, vtable, regionck};
use middle::typeck::check::regionmanip::replace_late_bound_regions;
use middle::typeck::CrateCtxt;
use util::ppaux::Repr;
......@@ -100,7 +100,7 @@ fn with_fcx(&mut self,
let inh = Inherited::new(ccx.tcx, param_env);
let fcx = blank_fn_ctxt(ccx, &inh, polytype.ty, item.id);
f(self, &fcx);
vtable2::select_all_fcx_obligations_or_error(&fcx);
vtable::select_all_fcx_obligations_or_error(&fcx);
regionck::regionck_item(&fcx, item);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册