Skip to content

Commit f7fbce8

Browse files
committed
---
yaml --- r: 219751 b: refs/heads/snap-stage3 c: 64f1a59 h: refs/heads/master i: 219749: e49327a 219747: 966a2c3 219743: e6cca15 v: v3
1 parent 20e0ef1 commit f7fbce8

File tree

7 files changed

+13
-11
lines changed

7 files changed

+13
-11
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
refs/heads/master: c044791d80ea0dc5c4b57b6030a67b69f8510239
3-
refs/heads/snap-stage3: 6947948b4df98b82a9e8f6847db442921edfc37b
3+
refs/heads/snap-stage3: 64f1a59daf4b7b5cbab1730f3b10fb73745d3b5e
44
refs/heads/try: b53c0f93eedcdedd4fd89bccc5a3a09d1c5cd23e
55
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
66
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596

branches/snap-stage3/src/librustc/middle/check_const.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,8 +284,8 @@ impl<'a, 'tcx> CheckCrateVisitor<'a, 'tcx> {
284284
fn check_static_type(&self, e: &ast::Expr) {
285285
let ty = self.tcx.node_id_to_type(e.id);
286286
let infcx = infer::new_infer_ctxt(self.tcx, &self.tcx.tables, None);
287-
let mut fulfill_cx = traits::FulfillmentContext::new(false);
288287
let cause = traits::ObligationCause::new(e.span, e.id, traits::SharedStatic);
288+
let mut fulfill_cx = infcx.fulfillment_cx.borrow_mut();
289289
fulfill_cx.register_builtin_bound(&infcx, ty, ty::BoundSync, cause);
290290
match fulfill_cx.select_all_or_error(&infcx, &infcx.parameter_environment) {
291291
Ok(()) => { },

branches/snap-stage3/src/librustc/middle/traits/mod.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ pub fn type_known_to_meet_builtin_bound<'a,'tcx>(infcx: &InferCtxt<'a,'tcx>,
322322
ty,
323323
bound);
324324

325-
let mut fulfill_cx = FulfillmentContext::new(false);
325+
let mut fulfill_cx = infcx.fulfillment_cx.borrow_mut();
326326

327327
// We can use a dummy node-id here because we won't pay any mind
328328
// to region obligations that arise (there shouldn't really be any
@@ -438,7 +438,8 @@ pub fn fully_normalize<'a,'tcx,T>(infcx: &InferCtxt<'a,'tcx>,
438438
debug!("normalize_param_env(value={:?})", value);
439439

440440
let mut selcx = &mut SelectionContext::new(infcx, closure_typer);
441-
let mut fulfill_cx = FulfillmentContext::new(false);
441+
let mut fulfill_cx = infcx.fulfillment_cx.borrow_mut();
442+
442443
let Normalized { value: normalized_value, obligations } =
443444
project::normalize(selcx, cause, value);
444445
debug!("normalize_param_env: normalized_value={:?} obligations={:?}",

branches/snap-stage3/src/librustc_trans/trans/common.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -994,7 +994,7 @@ pub fn fulfill_obligation<'a, 'tcx>(ccx: &CrateContext<'a, 'tcx>,
994994
// Currently, we use a fulfillment context to completely resolve
995995
// all nested obligations. This is because they can inform the
996996
// inference of the impl's type parameters.
997-
let mut fulfill_cx = traits::FulfillmentContext::new(true);
997+
let mut fulfill_cx = infcx.fulfillment_cx.borrow_mut();
998998
let vtable = selection.map(|predicate| {
999999
fulfill_cx.register_predicate_obligation(&infcx, predicate);
10001000
});
@@ -1019,10 +1019,10 @@ pub fn normalize_and_test_predicates<'a, 'tcx>(ccx: &CrateContext<'a, 'tcx>,
10191019
predicates);
10201020

10211021
let tcx = ccx.tcx();
1022-
let mut infcx = infer::new_infer_ctxt(tcx, &tcx.tables, None, false);
1022+
let infcx = infer::new_infer_ctxt(tcx, &tcx.tables, None, false);
10231023
let typer = NormalizingClosureTyper::new(tcx);
10241024
let mut selcx = traits::SelectionContext::new(&infcx, &typer);
1025-
let mut fulfill_cx = traits::FulfillmentContext::new(false);
1025+
let mut fulfill_cx = infcx.fulfillment_cx.borrow_mut();
10261026
let cause = traits::ObligationCause::dummy();
10271027
let traits::Normalized { value: predicates, obligations } =
10281028
traits::normalize(&mut selcx, cause.clone(), &predicates);

branches/snap-stage3/src/librustc_trans/trans/monomorphize.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,8 @@ pub fn normalize_associated_type<'tcx,T>(tcx: &ty::ctxt<'tcx>, value: &T) -> T
335335
result,
336336
obligations);
337337

338-
let mut fulfill_cx = traits::FulfillmentContext::new(true);
338+
let mut fulfill_cx = infcx.fulfillment_cx.borrow_mut();
339+
339340
for obligation in obligations {
340341
fulfill_cx.register_predicate_obligation(&infcx, obligation);
341342
}

branches/snap-stage3/src/librustc_typeck/check/compare_method.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ pub fn compare_impl_method<'tcx>(tcx: &ty::ctxt<'tcx>,
4444
impl_trait_ref);
4545

4646
let mut infcx = infer::new_infer_ctxt(tcx, &tcx.tables, None, true);
47-
let mut fulfillment_cx = traits::FulfillmentContext::new(true);
47+
let mut fulfillment_cx = infcx.fulfillment_cx.borrow_mut();
4848

4949
let trait_to_impl_substs = &impl_trait_ref.substs;
5050

@@ -420,7 +420,7 @@ pub fn compare_const_impl<'tcx>(tcx: &ty::ctxt<'tcx>,
420420
impl_trait_ref);
421421

422422
let infcx = infer::new_infer_ctxt(tcx, &tcx.tables, None, true);
423-
let mut fulfillment_cx = traits::FulfillmentContext::new(true);
423+
let mut fulfillment_cx = infcx.fulfillment_cx.borrow_mut();
424424

425425
// The below is for the most part highly similar to the procedure
426426
// for methods above. It is simpler in many respects, especially

branches/snap-stage3/src/librustc_typeck/coherence/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -531,7 +531,7 @@ impl<'a, 'tcx> CoherenceChecker<'a, 'tcx> {
531531
}
532532
};
533533

534-
let mut fulfill_cx = traits::FulfillmentContext::new(true);
534+
let mut fulfill_cx = infcx.fulfillment_cx.borrow_mut();
535535

536536
// Register an obligation for `A: Trait<B>`.
537537
let cause = traits::ObligationCause::misc(span, impl_did.node);

0 commit comments

Comments
 (0)