@@ -42,7 +42,7 @@ use hir::def_id::DefId;
42
42
use infer;
43
43
use infer:: { InferCtxt , InferOk , TypeFreshener } ;
44
44
use middle:: lang_items;
45
- use middle:: recursion_limit:: guarantee_one_mb_stack_left ;
45
+ use middle:: recursion_limit:: ensure_sufficient_stack ;
46
46
use mir:: interpret:: GlobalId ;
47
47
use ty:: fast_reject;
48
48
use ty:: relate:: TypeRelation ;
@@ -2856,7 +2856,7 @@ impl<'cx, 'gcx, 'tcx> SelectionContext<'cx, 'gcx, 'tcx> {
2856
2856
} ;
2857
2857
2858
2858
let cause = obligation. derived_cause ( BuiltinDerivedObligation ) ;
2859
- guarantee_one_mb_stack_left ( || {
2859
+ ensure_sufficient_stack ( || {
2860
2860
self . collect_predicates_for_types (
2861
2861
obligation. param_env ,
2862
2862
cause,
@@ -2906,7 +2906,7 @@ impl<'cx, 'gcx, 'tcx> SelectionContext<'cx, 'gcx, 'tcx> {
2906
2906
nested : ty:: Binder < Vec < Ty < ' tcx > > > ,
2907
2907
) -> VtableAutoImplData < PredicateObligation < ' tcx > > {
2908
2908
debug ! ( "vtable_auto_impl: nested={:?}" , nested) ;
2909
- guarantee_one_mb_stack_left ( || {
2909
+ ensure_sufficient_stack ( || {
2910
2910
2911
2911
let cause = obligation. derived_cause ( BuiltinDerivedObligation ) ;
2912
2912
let mut obligations = self . collect_predicates_for_types (
@@ -2959,7 +2959,7 @@ impl<'cx, 'gcx, 'tcx> SelectionContext<'cx, 'gcx, 'tcx> {
2959
2959
let ( substs, placeholder_map) = this. rematch_impl ( impl_def_id, obligation, snapshot) ;
2960
2960
debug ! ( "confirm_impl_candidate: substs={:?}" , substs) ;
2961
2961
let cause = obligation. derived_cause ( ImplDerivedObligation ) ;
2962
- guarantee_one_mb_stack_left ( || this. vtable_impl (
2962
+ ensure_sufficient_stack ( || this. vtable_impl (
2963
2963
impl_def_id,
2964
2964
substs,
2965
2965
cause,
@@ -3092,7 +3092,7 @@ impl<'cx, 'gcx, 'tcx> SelectionContext<'cx, 'gcx, 'tcx> {
3092
3092
let Normalized {
3093
3093
value : trait_ref,
3094
3094
obligations,
3095
- } = guarantee_one_mb_stack_left ( || project:: normalize_with_depth (
3095
+ } = ensure_sufficient_stack ( || project:: normalize_with_depth (
3096
3096
self ,
3097
3097
obligation. param_env ,
3098
3098
obligation. cause . clone ( ) ,
@@ -3175,7 +3175,7 @@ impl<'cx, 'gcx, 'tcx> SelectionContext<'cx, 'gcx, 'tcx> {
3175
3175
let Normalized {
3176
3176
value : trait_ref,
3177
3177
mut obligations,
3178
- } = guarantee_one_mb_stack_left ( || normalize_with_depth (
3178
+ } = ensure_sufficient_stack ( || normalize_with_depth (
3179
3179
self ,
3180
3180
obligation. param_env ,
3181
3181
obligation. cause . clone ( ) ,
@@ -3228,7 +3228,7 @@ impl<'cx, 'gcx, 'tcx> SelectionContext<'cx, 'gcx, 'tcx> {
3228
3228
let Normalized {
3229
3229
value : trait_ref,
3230
3230
mut obligations,
3231
- } = guarantee_one_mb_stack_left ( || normalize_with_depth (
3231
+ } = ensure_sufficient_stack ( || normalize_with_depth (
3232
3232
self ,
3233
3233
obligation. param_env ,
3234
3234
obligation. cause . clone ( ) ,
@@ -3486,7 +3486,7 @@ impl<'cx, 'gcx, 'tcx> SelectionContext<'cx, 'gcx, 'tcx> {
3486
3486
nested. extend ( obligations) ;
3487
3487
3488
3488
// Construct the nested Field<T>: Unsize<Field<U>> predicate.
3489
- nested. push ( guarantee_one_mb_stack_left ( || {
3489
+ nested. push ( ensure_sufficient_stack ( || {
3490
3490
tcx. predicate_for_trait_def (
3491
3491
obligation. param_env ,
3492
3492
obligation. cause . clone ( ) ,
@@ -3520,7 +3520,7 @@ impl<'cx, 'gcx, 'tcx> SelectionContext<'cx, 'gcx, 'tcx> {
3520
3520
nested. extend ( obligations) ;
3521
3521
3522
3522
// Construct the nested T: Unsize<U> predicate.
3523
- nested. push ( guarantee_one_mb_stack_left ( || {
3523
+ nested. push ( ensure_sufficient_stack ( || {
3524
3524
tcx. predicate_for_trait_def (
3525
3525
obligation. param_env ,
3526
3526
obligation. cause . clone ( ) ,
@@ -3602,7 +3602,7 @@ impl<'cx, 'gcx, 'tcx> SelectionContext<'cx, 'gcx, 'tcx> {
3602
3602
let Normalized {
3603
3603
value : impl_trait_ref,
3604
3604
obligations : mut nested_obligations,
3605
- } = guarantee_one_mb_stack_left ( || project:: normalize_with_depth (
3605
+ } = ensure_sufficient_stack ( || project:: normalize_with_depth (
3606
3606
self ,
3607
3607
obligation. param_env ,
3608
3608
obligation. cause . clone ( ) ,
0 commit comments