@@ -57,12 +57,14 @@ impl<'tcx> InferCtxt<'tcx> {
57
57
inference_vars : CanonicalVarValues < ' tcx > ,
58
58
answer : T ,
59
59
fulfill_cx : & mut dyn TraitEngine < ' tcx > ,
60
+ defining_use_anchor : DefiningAnchor ,
60
61
) -> Fallible < CanonicalQueryResponse < ' tcx , T > >
61
62
where
62
63
T : Debug + TypeFoldable < TyCtxt < ' tcx > > ,
63
64
Canonical < ' tcx , QueryResponse < ' tcx , T > > : ArenaAllocatable < ' tcx > ,
64
65
{
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) ?;
66
68
debug ! ( "query_response = {:#?}" , query_response) ;
67
69
let canonical_result = self . canonicalize_response ( query_response) ;
68
70
debug ! ( "canonical_result = {:#?}" , canonical_result) ;
@@ -104,24 +106,25 @@ impl<'tcx> InferCtxt<'tcx> {
104
106
inference_vars : CanonicalVarValues < ' tcx > ,
105
107
answer : T ,
106
108
fulfill_cx : & mut dyn TraitEngine < ' tcx > ,
109
+ defining_use_anchor : DefiningAnchor ,
107
110
) -> Result < QueryResponse < ' tcx , T > , NoSolution >
108
111
where
109
112
T : Debug + TypeFoldable < TyCtxt < ' tcx > > ,
110
113
{
111
114
let tcx = self . tcx ;
112
115
113
116
// 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 ) ;
115
118
debug ! ( "true_errors = {:#?}" , true_errors) ;
116
119
117
120
if !true_errors. is_empty ( ) {
118
121
// 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) ;
120
123
return Err ( NoSolution ) ;
121
124
}
122
125
123
126
// 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 ) ;
125
128
debug ! ( "ambig_errors = {:#?}" , ambig_errors) ;
126
129
127
130
let region_obligations = self . take_registered_region_obligations ( ) ;
0 commit comments