@@ -1747,7 +1747,7 @@ fn confirm_callable_candidate<'cx, 'tcx>(
17471747 ty : ret_type,
17481748 } ) ;
17491749
1750- confirm_param_env_candidate ( selcx, obligation, predicate, false )
1750+ confirm_param_env_candidate ( selcx, obligation, predicate, true )
17511751}
17521752
17531753fn confirm_param_env_candidate < ' cx , ' tcx > (
@@ -1767,8 +1767,18 @@ fn confirm_param_env_candidate<'cx, 'tcx>(
17671767 ) ;
17681768
17691769 let cache_projection = cache_entry. projection_ty ;
1770- let obligation_projection = obligation. predicate ;
17711770 let mut nested_obligations = Vec :: new ( ) ;
1771+ let obligation_projection = obligation. predicate ;
1772+ let obligation_projection = ensure_sufficient_stack ( || {
1773+ normalize_with_depth_to (
1774+ selcx,
1775+ obligation. param_env ,
1776+ obligation. cause . clone ( ) ,
1777+ obligation. recursion_depth + 1 ,
1778+ obligation_projection,
1779+ & mut nested_obligations,
1780+ )
1781+ } ) ;
17721782 let cache_projection = if potentially_unnormalized_candidate {
17731783 ensure_sufficient_stack ( || {
17741784 normalize_with_depth_to (
@@ -1784,6 +1794,8 @@ fn confirm_param_env_candidate<'cx, 'tcx>(
17841794 cache_projection
17851795 } ;
17861796
1797+ debug ! ( ?cache_projection, ?obligation_projection) ;
1798+
17871799 match infcx. at ( cause, param_env) . eq ( cache_projection, obligation_projection) {
17881800 Ok ( InferOk { value : _, obligations } ) => {
17891801 nested_obligations. extend ( obligations) ;
0 commit comments