rollup merge of #18266 : nick29581/vtable2.rs
This commit is contained in:
commit
dea37d73ca
5 changed files with 12 additions and 12 deletions
|
|
@ -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};
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
@ -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);
|
||||
}
|
||||
|
|
@ -1372,7 +1372,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
|
||||
}
|
||||
|
|
@ -1677,7 +1677,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);
|
||||
|
|
@ -2564,7 +2564,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
|
||||
|
|
@ -4036,7 +4036,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,
|
||||
|
|
@ -4743,7 +4743,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 @@ 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;
|
||||
|
|
@ -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::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;
|
||||
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue