@@ -368,11 +368,12 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
368368 let fn_sig = tcx. fn_sig ( def_id) ;
369369 let fn_sig = self . replace_bound_vars_with_fresh_vars ( span, infer:: FnCall , & fn_sig) . 0 ;
370370 let fn_sig = fn_sig. subst ( self . tcx , substs) ;
371- let fn_sig = match self . normalize_associated_types_in_as_infer_ok ( span, & fn_sig) {
372- InferOk { value, obligations : o } => {
373- obligations. extend ( o) ;
374- value
375- }
371+
372+ let InferOk { value, obligations : o } =
373+ self . normalize_associated_types_in_as_infer_ok ( span, & fn_sig) ;
374+ let fn_sig = {
375+ obligations. extend ( o) ;
376+ value
376377 } ;
377378
378379 // Register obligations for the parameters. This will include the
@@ -384,12 +385,14 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
384385 // Note that as the method comes from a trait, it should not have
385386 // any late-bound regions appearing in its bounds.
386387 let bounds = self . tcx . predicates_of ( def_id) . instantiate ( self . tcx , substs) ;
387- let bounds = match self . normalize_associated_types_in_as_infer_ok ( span, & bounds) {
388- InferOk { value, obligations : o } => {
389- obligations. extend ( o) ;
390- value
391- }
388+
389+ let InferOk { value, obligations : o } =
390+ self . normalize_associated_types_in_as_infer_ok ( span, & bounds) ;
391+ let bounds = {
392+ obligations. extend ( o) ;
393+ value
392394 } ;
395+
393396 assert ! ( !bounds. has_escaping_bound_vars( ) ) ;
394397
395398 let cause = traits:: ObligationCause :: misc ( span, self . body_id ) ;
0 commit comments