Skip to content

s/vtable2/vtable #18266

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 28, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/librustc/middle/typeck/check/method.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ use middle::ty;
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};
Expand Down
14 changes: 7 additions & 7 deletions src/librustc/middle/typeck/check/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ use syntax::visit::Visitor;
use syntax;

pub mod _match;
pub mod vtable2; // New trait code
pub mod vtable;
pub mod writeback;
pub mod regionmanip;
pub mod regionck;
Expand Down Expand Up @@ -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);
}
Expand Down Expand Up @@ -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
}
Expand Down Expand Up @@ -1682,7 +1682,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
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);
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -4037,7 +4037,7 @@ fn check_expr_with_unifier(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,
Expand Down Expand Up @@ -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);
}
Expand Down
4 changes: 2 additions & 2 deletions src/librustc/middle/typeck/check/regionck.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ use middle::ty;
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;
Expand Down Expand Up @@ -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();
}
Expand Down
4 changes: 2 additions & 2 deletions src/librustc/middle/typeck/check/wf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ use middle::traits;
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;
Expand Down Expand Up @@ -100,7 +100,7 @@ impl<'ccx, 'tcx> CheckTypeWellFormedVisitor<'ccx, 'tcx> {
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);
}

Expand Down