@@ -112,8 +112,8 @@ impl<'tcx> assembly::GoalKind<'tcx> for ProjectionPredicate<'tcx> {
112
112
) -> QueryResult < ' tcx > {
113
113
if let Some ( projection_pred) = assumption. as_projection_clause ( ) {
114
114
if projection_pred. projection_def_id ( ) == goal. predicate . def_id ( ) {
115
- ecx. probe (
116
- |ecx| {
115
+ ecx. probe ( |r| CandidateKind :: Candidate { name : "assumption" . into ( ) , result : * r } )
116
+ . enter ( |ecx| {
117
117
let assumption_projection_pred =
118
118
ecx. instantiate_binder_with_infer ( projection_pred) ;
119
119
ecx. eq (
@@ -128,9 +128,7 @@ impl<'tcx> assembly::GoalKind<'tcx> for ProjectionPredicate<'tcx> {
128
128
)
129
129
. expect ( "expected goal term to be fully unconstrained" ) ;
130
130
then ( ecx)
131
- } ,
132
- |r| CandidateKind :: Candidate { name : "assumption" . into ( ) , result : * r } ,
133
- )
131
+ } )
134
132
} else {
135
133
Err ( NoSolution )
136
134
}
@@ -154,6 +152,7 @@ impl<'tcx> assembly::GoalKind<'tcx> for ProjectionPredicate<'tcx> {
154
152
}
155
153
156
154
ecx. probe (
155
+ |r| CandidateKind :: Candidate { name : "impl" . into ( ) , result : * r } ) . enter (
157
156
|ecx| {
158
157
let impl_substs = ecx. fresh_substs_for_item ( impl_def_id) ;
159
158
let impl_trait_ref = impl_trait_ref. subst ( tcx, impl_substs) ;
@@ -235,7 +234,6 @@ impl<'tcx> assembly::GoalKind<'tcx> for ProjectionPredicate<'tcx> {
235
234
. expect ( "expected goal term to be fully unconstrained" ) ;
236
235
ecx. evaluate_added_goals_and_make_canonical_response ( Certainty :: Yes )
237
236
} ,
238
- |r| CandidateKind :: Candidate { name : "impl" . into ( ) , result : * r } ,
239
237
)
240
238
}
241
239
@@ -331,8 +329,8 @@ impl<'tcx> assembly::GoalKind<'tcx> for ProjectionPredicate<'tcx> {
331
329
goal : Goal < ' tcx , Self > ,
332
330
) -> QueryResult < ' tcx > {
333
331
let tcx = ecx. tcx ( ) ;
334
- ecx. probe (
335
- |ecx| {
332
+ ecx. probe ( |r| CandidateKind :: Candidate { name : "builtin pointee" . into ( ) , result : * r } )
333
+ . enter ( |ecx| {
336
334
let metadata_ty = match goal. predicate . self_ty ( ) . kind ( ) {
337
335
ty:: Bool
338
336
| ty:: Char
@@ -415,9 +413,7 @@ impl<'tcx> assembly::GoalKind<'tcx> for ProjectionPredicate<'tcx> {
415
413
ecx. eq ( goal. param_env , goal. predicate . term , metadata_ty. into ( ) )
416
414
. expect ( "expected goal term to be fully unconstrained" ) ;
417
415
ecx. evaluate_added_goals_and_make_canonical_response ( Certainty :: Yes )
418
- } ,
419
- |r| CandidateKind :: Candidate { name : "builtin pointee" . into ( ) , result : * r } ,
420
- )
416
+ } )
421
417
}
422
418
423
419
fn consider_builtin_future_candidate (
@@ -552,14 +548,15 @@ impl<'tcx> assembly::GoalKind<'tcx> for ProjectionPredicate<'tcx> {
552
548
) ,
553
549
} ;
554
550
555
- ecx. probe (
556
- |ecx| {
557
- ecx. eq ( goal. param_env , goal. predicate . term , discriminant_ty. into ( ) )
558
- . expect ( "expected goal term to be fully unconstrained" ) ;
559
- ecx. evaluate_added_goals_and_make_canonical_response ( Certainty :: Yes )
560
- } ,
561
- |r| CandidateKind :: Candidate { name : "builtin discriminant kind" . into ( ) , result : * r } ,
562
- )
551
+ ecx. probe ( |r| CandidateKind :: Candidate {
552
+ name : "builtin discriminant kind" . into ( ) ,
553
+ result : * r,
554
+ } )
555
+ . enter ( |ecx| {
556
+ ecx. eq ( goal. param_env , goal. predicate . term , discriminant_ty. into ( ) )
557
+ . expect ( "expected goal term to be fully unconstrained" ) ;
558
+ ecx. evaluate_added_goals_and_make_canonical_response ( Certainty :: Yes )
559
+ } )
563
560
}
564
561
565
562
fn consider_builtin_destruct_candidate (
0 commit comments