@@ -42,7 +42,7 @@ use hir::def_id::DefId;
4242use infer;
4343use infer:: { InferCtxt , InferOk , TypeFreshener } ;
4444use middle:: lang_items;
45- use middle:: recursion_limit:: guarantee_one_mb_stack_left ;
45+ use middle:: recursion_limit:: ensure_sufficient_stack ;
4646use mir:: interpret:: GlobalId ;
4747use ty:: fast_reject;
4848use ty:: relate:: TypeRelation ;
@@ -2856,7 +2856,7 @@ impl<'cx, 'gcx, 'tcx> SelectionContext<'cx, 'gcx, 'tcx> {
28562856 } ;
28572857
28582858 let cause = obligation. derived_cause ( BuiltinDerivedObligation ) ;
2859- guarantee_one_mb_stack_left ( || {
2859+ ensure_sufficient_stack ( || {
28602860 self . collect_predicates_for_types (
28612861 obligation. param_env ,
28622862 cause,
@@ -2906,7 +2906,7 @@ impl<'cx, 'gcx, 'tcx> SelectionContext<'cx, 'gcx, 'tcx> {
29062906 nested : ty:: Binder < Vec < Ty < ' tcx > > > ,
29072907 ) -> VtableAutoImplData < PredicateObligation < ' tcx > > {
29082908 debug ! ( "vtable_auto_impl: nested={:?}" , nested) ;
2909- guarantee_one_mb_stack_left ( || {
2909+ ensure_sufficient_stack ( || {
29102910
29112911 let cause = obligation. derived_cause ( BuiltinDerivedObligation ) ;
29122912 let mut obligations = self . collect_predicates_for_types (
@@ -2959,7 +2959,7 @@ impl<'cx, 'gcx, 'tcx> SelectionContext<'cx, 'gcx, 'tcx> {
29592959 let ( substs, placeholder_map) = this. rematch_impl ( impl_def_id, obligation, snapshot) ;
29602960 debug ! ( "confirm_impl_candidate: substs={:?}" , substs) ;
29612961 let cause = obligation. derived_cause ( ImplDerivedObligation ) ;
2962- guarantee_one_mb_stack_left ( || this. vtable_impl (
2962+ ensure_sufficient_stack ( || this. vtable_impl (
29632963 impl_def_id,
29642964 substs,
29652965 cause,
@@ -3092,7 +3092,7 @@ impl<'cx, 'gcx, 'tcx> SelectionContext<'cx, 'gcx, 'tcx> {
30923092 let Normalized {
30933093 value : trait_ref,
30943094 obligations,
3095- } = guarantee_one_mb_stack_left ( || project:: normalize_with_depth (
3095+ } = ensure_sufficient_stack ( || project:: normalize_with_depth (
30963096 self ,
30973097 obligation. param_env ,
30983098 obligation. cause . clone ( ) ,
@@ -3175,7 +3175,7 @@ impl<'cx, 'gcx, 'tcx> SelectionContext<'cx, 'gcx, 'tcx> {
31753175 let Normalized {
31763176 value : trait_ref,
31773177 mut obligations,
3178- } = guarantee_one_mb_stack_left ( || normalize_with_depth (
3178+ } = ensure_sufficient_stack ( || normalize_with_depth (
31793179 self ,
31803180 obligation. param_env ,
31813181 obligation. cause . clone ( ) ,
@@ -3228,7 +3228,7 @@ impl<'cx, 'gcx, 'tcx> SelectionContext<'cx, 'gcx, 'tcx> {
32283228 let Normalized {
32293229 value : trait_ref,
32303230 mut obligations,
3231- } = guarantee_one_mb_stack_left ( || normalize_with_depth (
3231+ } = ensure_sufficient_stack ( || normalize_with_depth (
32323232 self ,
32333233 obligation. param_env ,
32343234 obligation. cause . clone ( ) ,
@@ -3486,7 +3486,7 @@ impl<'cx, 'gcx, 'tcx> SelectionContext<'cx, 'gcx, 'tcx> {
34863486 nested. extend ( obligations) ;
34873487
34883488 // Construct the nested Field<T>: Unsize<Field<U>> predicate.
3489- nested. push ( guarantee_one_mb_stack_left ( || {
3489+ nested. push ( ensure_sufficient_stack ( || {
34903490 tcx. predicate_for_trait_def (
34913491 obligation. param_env ,
34923492 obligation. cause . clone ( ) ,
@@ -3520,7 +3520,7 @@ impl<'cx, 'gcx, 'tcx> SelectionContext<'cx, 'gcx, 'tcx> {
35203520 nested. extend ( obligations) ;
35213521
35223522 // Construct the nested T: Unsize<U> predicate.
3523- nested. push ( guarantee_one_mb_stack_left ( || {
3523+ nested. push ( ensure_sufficient_stack ( || {
35243524 tcx. predicate_for_trait_def (
35253525 obligation. param_env ,
35263526 obligation. cause . clone ( ) ,
@@ -3602,7 +3602,7 @@ impl<'cx, 'gcx, 'tcx> SelectionContext<'cx, 'gcx, 'tcx> {
36023602 let Normalized {
36033603 value : impl_trait_ref,
36043604 obligations : mut nested_obligations,
3605- } = guarantee_one_mb_stack_left ( || project:: normalize_with_depth (
3605+ } = ensure_sufficient_stack ( || project:: normalize_with_depth (
36063606 self ,
36073607 obligation. param_env ,
36083608 obligation. cause . clone ( ) ,
0 commit comments