@@ -156,6 +156,7 @@ where
156
156
self . trait_def_id ( cx)
157
157
}
158
158
159
+ #[ instrument( level = "trace" , skip( ecx, then) ) ]
159
160
fn probe_and_match_goal_against_assumption (
160
161
ecx : & mut EvalCtxt < ' _ , D > ,
161
162
source : CandidateSource < I > ,
@@ -164,17 +165,20 @@ where
164
165
then : impl FnOnce ( & mut EvalCtxt < ' _ , D > ) -> QueryResult < I > ,
165
166
) -> Result < Candidate < I > , NoSolution > {
166
167
if let Some ( projection_pred) = assumption. as_projection_clause ( ) {
168
+ tracing:: trace!( "assumption is projection clause" ) ;
167
169
if projection_pred. projection_def_id ( ) == goal. predicate . clone ( ) . def_id ( ) {
168
170
let cx = ecx. cx ( ) ;
169
171
if !DeepRejectCtxt :: relate_rigid_rigid ( cx. interner ( ) ) . args_may_unify (
170
172
goal. predicate . alias . args . clone ( ) ,
171
173
projection_pred. clone ( ) . skip_binder ( ) . projection_term . args ,
172
174
) {
175
+ tracing:: trace!( "args will not unify" ) ;
173
176
return Err ( NoSolution ) ;
174
177
}
175
178
ecx. probe_trait_candidate ( source) . enter ( |ecx| {
176
179
let assumption_projection_pred =
177
180
ecx. instantiate_binder_with_infer ( projection_pred) ;
181
+ tracing:: trace!( ?assumption_projection_pred) ;
178
182
ecx. eq (
179
183
goal. param_env . clone ( ) ,
180
184
goal. predicate . alias . clone ( ) ,
@@ -334,6 +338,8 @@ where
334
338
kind => panic ! ( "expected projection, found {kind:?}" ) ,
335
339
} ;
336
340
341
+ tracing:: trace!( ?term) ;
342
+
337
343
ecx. instantiate_normalizes_to_term ( goal, term. instantiate ( cx. interner ( ) , target_args) ) ;
338
344
ecx. evaluate_added_goals_and_make_canonical_response ( Certainty :: Yes )
339
345
} )
@@ -384,6 +390,7 @@ where
384
390
panic ! ( "`FnPtr` does not have an associated type: {:?}" , goal) ;
385
391
}
386
392
393
+ #[ tracing:: instrument( level = "trace" , skip( ecx) , ret) ]
387
394
fn consider_builtin_fn_trait_candidates (
388
395
ecx : & mut EvalCtxt < ' _ , D > ,
389
396
goal : Goal < I , Self > ,
@@ -418,6 +425,8 @@ where
418
425
} )
419
426
. upcast ( cx. interner ( ) ) ;
420
427
428
+ tracing:: trace!( ?pred) ;
429
+
421
430
Self :: probe_and_consider_implied_clause (
422
431
ecx,
423
432
CandidateSource :: BuiltinImpl ( BuiltinImplSource :: Misc ) ,
0 commit comments