Skip to content

Commit 81693a4

Browse files
committed
---
yaml --- r: 235064 b: refs/heads/stable c: 64f1a59 h: refs/heads/master v: v3
1 parent 24758b8 commit 81693a4

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
@@ -29,7 +29,7 @@ refs/heads/tmp: afae2ff723393b3ab4ccffef6ac7c6d1809e2da0
2929
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f
3030
refs/tags/homu-tmp: f859507de8c410b648d934d8f5ec1c52daac971d
3131
refs/tags/1.0.0-beta: 8cbb92b53468ee2b0c2d3eeb8567005953d40828
32-
refs/heads/stable: 6947948b4df98b82a9e8f6847db442921edfc37b
32+
refs/heads/stable: 64f1a59daf4b7b5cbab1730f3b10fb73745d3b5e
3333
refs/tags/1.0.0: 55bd4f8ff2b323f317ae89e254ce87162d52a375
3434
refs/tags/1.1.0: bc3c16f09287e5545c1d3f76b7abd54f2eca868b
3535
refs/tags/1.2.0: f557861f822c34f07270347b94b5280de20a597e

branches/stable/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/stable/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/stable/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/stable/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/stable/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/stable/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)