File tree Expand file tree Collapse file tree 2 files changed +12
-16
lines changed
compiler/rustc_next_trait_solver/src/solve Expand file tree Collapse file tree 2 files changed +12
-16
lines changed Original file line number Diff line number Diff line change @@ -445,17 +445,15 @@ where
445445 goal_kind : ty:: ClosureKind ,
446446 ) -> Result < Candidate < I > , NoSolution > {
447447 let cx = ecx. cx ( ) ;
448- let tupled_inputs_and_output =
449- match structural_traits:: extract_tupled_inputs_and_output_from_callable (
448+ let Some ( tupled_inputs_and_output) =
449+ structural_traits:: extract_tupled_inputs_and_output_from_callable (
450450 cx,
451451 goal. predicate . self_ty ( ) ,
452452 goal_kind,
453- ) ? {
454- Some ( tupled_inputs_and_output) => tupled_inputs_and_output,
455- None => {
456- return ecx. forced_ambiguity ( MaybeCause :: Ambiguity ) ;
457- }
458- } ;
453+ ) ?
454+ else {
455+ return ecx. forced_ambiguity ( MaybeCause :: Ambiguity ) ;
456+ } ;
459457 let ( inputs, output) = ecx. instantiate_binder_with_infer ( tupled_inputs_and_output) ;
460458
461459 // A built-in `Fn` impl only holds if the output is sized.
Original file line number Diff line number Diff line change @@ -360,17 +360,15 @@ where
360360 }
361361
362362 let cx = ecx. cx ( ) ;
363- let tupled_inputs_and_output =
364- match structural_traits:: extract_tupled_inputs_and_output_from_callable (
363+ let Some ( tupled_inputs_and_output) =
364+ structural_traits:: extract_tupled_inputs_and_output_from_callable (
365365 cx,
366366 goal. predicate . self_ty ( ) ,
367367 goal_kind,
368- ) ? {
369- Some ( a) => a,
370- None => {
371- return ecx. forced_ambiguity ( MaybeCause :: Ambiguity ) ;
372- }
373- } ;
368+ ) ?
369+ else {
370+ return ecx. forced_ambiguity ( MaybeCause :: Ambiguity ) ;
371+ } ;
374372 let ( inputs, output) = ecx. instantiate_binder_with_infer ( tupled_inputs_and_output) ;
375373
376374 // A built-in `Fn` impl only holds if the output is sized.
You can’t perform that action at this time.
0 commit comments