@@ -393,6 +393,7 @@ impl<'tcx> InferCtxt<'tcx> {
393393/// will instantiate fresh inference variables for each canonical 
394394/// variable instead. Therefore, the result of this method must be 
395395/// properly unified 
396+ #[ instrument( level = "debug" ,  skip( self ,  cause,  param_env) ) ]  
396397    fn  query_response_substitution_guess < R > ( 
397398        & self , 
398399        cause :  & ObligationCause < ' tcx > , 
@@ -403,11 +404,6 @@ impl<'tcx> InferCtxt<'tcx> {
403404    where 
404405        R :  Debug  + TypeFoldable < ' tcx > , 
405406    { 
406-         debug ! ( 
407-             "query_response_substitution_guess(original_values={:#?}, query_response={:#?})" , 
408-             original_values,  query_response, 
409-         ) ; 
410- 
411407        // For each new universe created in the query result that did 
412408        // not appear in the original query, create a local 
413409        // superuniverse. 
@@ -502,7 +498,9 @@ impl<'tcx> InferCtxt<'tcx> {
502498        for  & ( a,  b)  in  & query_response. value . opaque_types  { 
503499            let  a = substitute_value ( self . tcx ,  & result_subst,  a) ; 
504500            let  b = substitute_value ( self . tcx ,  & result_subst,  b) ; 
505-             obligations. extend ( self . at ( cause,  param_env) . eq ( a,  b) ?. obligations ) ; 
501+             debug ! ( ?a,  ?b,  "constrain opaque type" ) ; 
502+             obligations
503+                 . extend ( self . at ( cause,  param_env) . define_opaque_types ( true ) . eq ( a,  b) ?. obligations ) ; 
506504        } 
507505
508506        Ok ( InferOk  {  value :  result_subst,  obligations } ) 
0 commit comments