@@ -81,15 +81,10 @@ where
8181 None
8282 } ,
8383 |ecx| {
84- ecx. probe ( |& result| ProbeKind :: RigidAlias { result } )
85- . enter ( |this| {
86- this. structurally_instantiate_normalizes_to_term (
87- goal,
88- goal. predicate . alias ,
89- ) ;
90- this. evaluate_added_goals_and_make_canonical_response ( Certainty :: Yes )
91- } )
92- . map_err ( Into :: into)
84+ ecx. probe ( |& result| ProbeKind :: RigidAlias { result } ) . enter ( |this| {
85+ this. structurally_instantiate_normalizes_to_term ( goal, goal. predicate . alias ) ;
86+ this. evaluate_added_goals_and_make_canonical_response ( Certainty :: Yes )
87+ } )
9388 } ,
9489 )
9590 }
@@ -340,11 +335,9 @@ where
340335 GoalSource :: Misc ,
341336 goal. with ( cx, PredicateKind :: Ambiguous ) ,
342337 ) ;
343- return ecx
344- . evaluate_added_goals_and_make_canonical_response (
345- Certainty :: Yes ,
346- )
347- . map_err ( Into :: into) ;
338+ return ecx. evaluate_added_goals_and_make_canonical_response (
339+ Certainty :: Yes ,
340+ ) ;
348341 }
349342 // Outside of coherence, we treat the associated item as rigid instead.
350343 ty:: TypingMode :: Typeck { .. }
@@ -356,11 +349,9 @@ where
356349 goal,
357350 goal. predicate . alias ,
358351 ) ;
359- return ecx
360- . evaluate_added_goals_and_make_canonical_response (
361- Certainty :: Yes ,
362- )
363- . map_err ( Into :: into) ;
352+ return ecx. evaluate_added_goals_and_make_canonical_response (
353+ Certainty :: Yes ,
354+ ) ;
364355 }
365356 } ;
366357 }
@@ -390,10 +381,10 @@ where
390381 // This is not the case here and we only prefer adding an ambiguous
391382 // nested goal for consistency.
392383 ecx. add_goal ( GoalSource :: Misc , goal. with ( cx, PredicateKind :: Ambiguous ) ) ;
393- return then ( ecx, Certainty :: Yes ) . map_err ( Into :: into ) ;
384+ return then ( ecx, Certainty :: Yes ) ;
394385 } else {
395386 ecx. structurally_instantiate_normalizes_to_term ( goal, goal. predicate . alias ) ;
396- return then ( ecx, Certainty :: Yes ) . map_err ( Into :: into ) ;
387+ return then ( ecx, Certainty :: Yes ) ;
397388 }
398389 } else {
399390 return error_response ( ecx, cx. delay_bug ( "missing item" ) ) ;
@@ -461,7 +452,7 @@ where
461452 } ;
462453
463454 ecx. instantiate_normalizes_to_term ( goal, term) ;
464- ecx. evaluate_added_goals_and_make_canonical_response ( Certainty :: Yes ) . map_err ( Into :: into )
455+ ecx. evaluate_added_goals_and_make_canonical_response ( Certainty :: Yes )
465456 } )
466457 }
467458
@@ -561,7 +552,6 @@ where
561552 pred,
562553 [ ( GoalSource :: ImplWhereBound , goal. with ( cx, output_is_sized_pred) ) ] ,
563554 )
564- . map_err ( Into :: into)
565555 }
566556
567557 fn consider_builtin_async_fn_trait_candidates (
@@ -748,8 +738,9 @@ where
748738 // and opaque types: If the `self_ty` is `Sized`, then the metadata is `()`.
749739 // FIXME(ptr_metadata): This impl overlaps with the other impls and shouldn't
750740 // exist. Instead, `Pointee<Metadata = ()>` should be a supertrait of `Sized`.
751- let alias_bound_result =
752- ecx. probe_builtin_trait_candidate ( BuiltinImplSource :: Misc ) . enter ( |ecx| {
741+ let alias_bound_result = ecx
742+ . probe_builtin_trait_candidate ( BuiltinImplSource :: Misc )
743+ . enter ( |ecx| {
753744 let sized_predicate = ty:: TraitRef :: new (
754745 cx,
755746 cx. require_trait_lang_item ( SolverTraitLangItem :: Sized ) ,
@@ -758,12 +749,8 @@ where
758749 ecx. add_goal ( GoalSource :: Misc , goal. with ( cx, sized_predicate) ) ;
759750 ecx. instantiate_normalizes_to_term ( goal, Ty :: new_unit ( cx) . into ( ) ) ;
760751 ecx. evaluate_added_goals_and_make_canonical_response ( Certainty :: Yes )
761- } ) ;
762-
763- let alias_bound_result = match alias_bound_result. map_err_to_rerun ( ) ? {
764- Ok ( i) => Ok ( i) ,
765- Err ( NoSolution ) => Err ( NoSolution ) ,
766- } ;
752+ } )
753+ . map_err_to_rerun ( ) ?;
767754
768755 // In case the dummy alias-bound candidate does not apply, we instead treat this projection
769756 // as rigid.
@@ -873,7 +860,6 @@ where
873860 // but that's already proven by the generator being WF.
874861 [ ] ,
875862 )
876- . map_err ( Into :: into)
877863 }
878864
879865 fn consider_builtin_fused_iterator_candidate (
0 commit comments