@@ -57,12 +57,14 @@ impl<'tcx> InferCtxt<'tcx> {
5757 inference_vars : CanonicalVarValues < ' tcx > ,
5858 answer : T ,
5959 fulfill_cx : & mut dyn TraitEngine < ' tcx > ,
60+ defining_use_anchor : DefiningAnchor ,
6061 ) -> Fallible < CanonicalQueryResponse < ' tcx , T > >
6162 where
6263 T : Debug + TypeFoldable < TyCtxt < ' tcx > > ,
6364 Canonical < ' tcx , QueryResponse < ' tcx , T > > : ArenaAllocatable < ' tcx > ,
6465 {
65- let query_response = self . make_query_response ( inference_vars, answer, fulfill_cx) ?;
66+ let query_response =
67+ self . make_query_response ( inference_vars, answer, fulfill_cx, defining_use_anchor) ?;
6668 debug ! ( "query_response = {:#?}" , query_response) ;
6769 let canonical_result = self . canonicalize_response ( query_response) ;
6870 debug ! ( "canonical_result = {:#?}" , canonical_result) ;
@@ -104,24 +106,25 @@ impl<'tcx> InferCtxt<'tcx> {
104106 inference_vars : CanonicalVarValues < ' tcx > ,
105107 answer : T ,
106108 fulfill_cx : & mut dyn TraitEngine < ' tcx > ,
109+ defining_use_anchor : DefiningAnchor ,
107110 ) -> Result < QueryResponse < ' tcx , T > , NoSolution >
108111 where
109112 T : Debug + TypeFoldable < TyCtxt < ' tcx > > ,
110113 {
111114 let tcx = self . tcx ;
112115
113116 // Select everything, returning errors.
114- let true_errors = fulfill_cx. select_where_possible ( self , self . old_defining_use_anchor ) ;
117+ let true_errors = fulfill_cx. select_where_possible ( self , defining_use_anchor ) ;
115118 debug ! ( "true_errors = {:#?}" , true_errors) ;
116119
117120 if !true_errors. is_empty ( ) {
118121 // FIXME -- we don't indicate *why* we failed to solve
119- debug ! ( "make_query_response: true_errors={:#?}" , true_errors) ;
122+ debug ! ( "true_errors={:#?}" , true_errors) ;
120123 return Err ( NoSolution ) ;
121124 }
122125
123126 // Anything left unselected *now* must be an ambiguity.
124- let ambig_errors = fulfill_cx. select_all_or_error ( self , self . old_defining_use_anchor ) ;
127+ let ambig_errors = fulfill_cx. select_all_or_error ( self , defining_use_anchor ) ;
125128 debug ! ( "ambig_errors = {:#?}" , ambig_errors) ;
126129
127130 let region_obligations = self . take_registered_region_obligations ( ) ;
0 commit comments