diff --git a/src/librustc/middle/typeck/check/method.rs b/src/librustc/middle/typeck/check/method.rs index 4560c5194649410e769d79f98de7a3972b2d211a..b768bb8f2d65a6baeb2a3823b010b12335dbae2e 100644 --- a/src/librustc/middle/typeck/check/method.rs +++ b/src/librustc/middle/typeck/check/method.rs @@ -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}; diff --git a/src/librustc/middle/typeck/check/mod.rs b/src/librustc/middle/typeck/check/mod.rs index 5f7b31e573adedad4ccc1e554de5bd66ddecf34d..596e30f00cd5b204a0580a06214bb51922637ddb 100644 --- a/src/librustc/middle/typeck/check/mod.rs +++ b/src/librustc/middle/typeck/check/mod.rs @@ -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); } diff --git a/src/librustc/middle/typeck/check/regionck.rs b/src/librustc/middle/typeck/check/regionck.rs index 76074120c0edb27d0cba7141e08926a419f19f7e..7cca4f241d1e63ff4fbe10483f5259f31aae9592 100644 --- a/src/librustc/middle/typeck/check/regionck.rs +++ b/src/librustc/middle/typeck/check/regionck.rs @@ -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(); } diff --git a/src/librustc/middle/typeck/check/vtable2.rs b/src/librustc/middle/typeck/check/vtable.rs similarity index 100% rename from src/librustc/middle/typeck/check/vtable2.rs rename to src/librustc/middle/typeck/check/vtable.rs diff --git a/src/librustc/middle/typeck/check/wf.rs b/src/librustc/middle/typeck/check/wf.rs index dc79fd4aa328c151fdf75d200069f08f96ae2630..3c594fbf2d3661ea4277cdfe79dd34d41092b48e 100644 --- a/src/librustc/middle/typeck/check/wf.rs +++ b/src/librustc/middle/typeck/check/wf.rs @@ -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); }