Skip to content

Commit dea37d7

Browse files
committed
rollup merge of rust-lang#18266 : nick29581/vtable2.rs
2 parents dc5a18c + e4b913f commit dea37d7

File tree

5 files changed

+12
-12
lines changed

5 files changed

+12
-12
lines changed

src/librustc/middle/typeck/check/method.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ use middle::ty;
8888
use middle::typeck::astconv::AstConv;
8989
use middle::typeck::check::{FnCtxt, NoPreference, PreferMutLvalue};
9090
use middle::typeck::check::{impl_self_ty};
91-
use middle::typeck::check::vtable2::select_fcx_obligations_where_possible;
91+
use middle::typeck::check::vtable::select_fcx_obligations_where_possible;
9292
use middle::typeck::check;
9393
use middle::typeck::infer;
9494
use middle::typeck::{MethodCall, MethodCallee};

src/librustc/middle/typeck/check/mod.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ use syntax::visit::Visitor;
139139
use syntax;
140140

141141
pub mod _match;
142-
pub mod vtable2; // New trait code
142+
pub mod vtable;
143143
pub mod writeback;
144144
pub mod regionmanip;
145145
pub mod regionck;
@@ -409,7 +409,7 @@ fn check_bare_fn(ccx: &CrateCtxt,
409409
let fcx = check_fn(ccx, fn_ty.fn_style, id, &fn_ty.sig,
410410
decl, id, body, &inh);
411411

412-
vtable2::select_all_fcx_obligations_or_error(&fcx);
412+
vtable::select_all_fcx_obligations_or_error(&fcx);
413413
regionck::regionck_fn(&fcx, id, body);
414414
writeback::resolve_type_vars_in_fn(&fcx, decl, body);
415415
}
@@ -1372,7 +1372,7 @@ fn check_cast(fcx: &FnCtxt,
13721372

13731373
if ty::type_is_trait(t_1) {
13741374
// This will be looked up later on.
1375-
vtable2::check_object_cast(fcx, cast_expr, e, t_1);
1375+
vtable::check_object_cast(fcx, cast_expr, e, t_1);
13761376
fcx.write_ty(id, t_1);
13771377
return
13781378
}
@@ -1677,7 +1677,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
16771677
ty::UnsizeVtable(ref ty_trait, self_ty) => {
16781678
// If the type is `Foo+'a`, ensures that the type
16791679
// being cast to `Foo+'a` implements `Foo`:
1680-
vtable2::register_object_cast_obligations(self,
1680+
vtable::register_object_cast_obligations(self,
16811681
span,
16821682
ty_trait,
16831683
self_ty);
@@ -2564,7 +2564,7 @@ fn check_argument_types<'a>(fcx: &FnCtxt,
25642564
// an "opportunistic" vtable resolution of any trait
25652565
// bounds on the call.
25662566
if check_blocks {
2567-
vtable2::select_fcx_obligations_where_possible(fcx);
2567+
vtable::select_fcx_obligations_where_possible(fcx);
25682568
}
25692569

25702570
// For variadic functions, we don't have a declared type for all of
@@ -4036,7 +4036,7 @@ fn check_expr_with_unifier(fcx: &FnCtxt,
40364036
ast::ExprForLoop(ref pat, ref head, ref block, _) => {
40374037
check_expr(fcx, &**head);
40384038
let typ = lookup_method_for_for_loop(fcx, &**head, expr.id);
4039-
vtable2::select_fcx_obligations_where_possible(fcx);
4039+
vtable::select_fcx_obligations_where_possible(fcx);
40404040

40414041
let pcx = pat_ctxt {
40424042
fcx: fcx,
@@ -4743,7 +4743,7 @@ pub fn check_const_with_ty(fcx: &FnCtxt,
47434743

47444744
check_expr_with_hint(fcx, e, declty);
47454745
demand::coerce(fcx, e.span, declty, e);
4746-
vtable2::select_all_fcx_obligations_or_error(fcx);
4746+
vtable::select_all_fcx_obligations_or_error(fcx);
47474747
regionck::regionck_expr(fcx, e);
47484748
writeback::resolve_type_vars_in_expr(fcx, e);
47494749
}

src/librustc/middle/typeck/check/regionck.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ use middle::ty;
126126
use middle::typeck::astconv::AstConv;
127127
use middle::typeck::check::FnCtxt;
128128
use middle::typeck::check::regionmanip;
129-
use middle::typeck::check::vtable2;
129+
use middle::typeck::check::vtable;
130130
use middle::typeck::infer::resolve_and_force_all_but_regions;
131131
use middle::typeck::infer::resolve_type;
132132
use middle::typeck::infer;
@@ -172,7 +172,7 @@ pub fn regionck_fn(fcx: &FnCtxt, id: ast::NodeId, blk: &ast::Block) {
172172

173173
// Region checking a fn can introduce new trait obligations,
174174
// particularly around closure bounds.
175-
vtable2::select_all_fcx_obligations_or_error(fcx);
175+
vtable::select_all_fcx_obligations_or_error(fcx);
176176

177177
fcx.infcx().resolve_regions_and_report_errors();
178178
}

src/librustc/middle/typeck/check/wf.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ use middle::traits;
1414
use middle::ty;
1515
use middle::ty_fold::{TypeFolder, TypeFoldable};
1616
use middle::typeck::astconv::AstConv;
17-
use middle::typeck::check::{FnCtxt, Inherited, blank_fn_ctxt, vtable2, regionck};
17+
use middle::typeck::check::{FnCtxt, Inherited, blank_fn_ctxt, vtable, regionck};
1818
use middle::typeck::check::regionmanip::replace_late_bound_regions;
1919
use middle::typeck::CrateCtxt;
2020
use util::ppaux::Repr;
@@ -100,7 +100,7 @@ impl<'ccx, 'tcx> CheckTypeWellFormedVisitor<'ccx, 'tcx> {
100100
let inh = Inherited::new(ccx.tcx, param_env);
101101
let fcx = blank_fn_ctxt(ccx, &inh, polytype.ty, item.id);
102102
f(self, &fcx);
103-
vtable2::select_all_fcx_obligations_or_error(&fcx);
103+
vtable::select_all_fcx_obligations_or_error(&fcx);
104104
regionck::regionck_item(&fcx, item);
105105
}
106106

0 commit comments

Comments
 (0)