@@ -745,8 +745,7 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
745745 }
746746 ObligationCauseCode :: BlockTailExpression (
747747 _,
748- scrut_hir_id,
749- hir:: MatchSource :: TryDesugar ,
748+ hir:: MatchSource :: TryDesugar ( scrut_hir_id) ,
750749 ) => {
751750 if let Some ( ty:: error:: ExpectedFound { expected, .. } ) = exp_found {
752751 let scrut_expr = self . tcx . hir ( ) . expect_expr ( scrut_hir_id) ;
@@ -782,12 +781,11 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
782781 prior_arm_ty,
783782 source,
784783 ref prior_arms,
785- scrut_hir_id,
786784 opt_suggest_box_span,
787785 scrut_span,
788786 ..
789787 } ) => match source {
790- hir:: MatchSource :: TryDesugar => {
788+ hir:: MatchSource :: TryDesugar ( scrut_hir_id ) => {
791789 if let Some ( ty:: error:: ExpectedFound { expected, .. } ) = exp_found {
792790 let scrut_expr = self . tcx . hir ( ) . expect_expr ( scrut_hir_id) ;
793791 let scrut_ty = if let hir:: ExprKind :: Call ( _, args) = & scrut_expr. kind {
@@ -2077,7 +2075,7 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
20772075 if let & ( MatchExpressionArm ( box MatchExpressionArmCause { source, .. } )
20782076 | BlockTailExpression ( .., source)
20792077 ) = code
2080- && let hir:: MatchSource :: TryDesugar = source
2078+ && let hir:: MatchSource :: TryDesugar ( _ ) = source
20812079 && let Some ( ( expected_ty, found_ty, _, _) ) = self . values_str ( trace. values )
20822080 {
20832081 suggestions. push ( TypeErrorAdditionalDiags :: TryCannotConvert {
@@ -2954,11 +2952,11 @@ impl<'tcx> ObligationCauseExt<'tcx> for ObligationCause<'tcx> {
29542952 CompareImplItemObligation { kind : ty:: AssocKind :: Const , .. } => {
29552953 ObligationCauseFailureCode :: ConstCompat { span, subdiags }
29562954 }
2957- BlockTailExpression ( .., hir:: MatchSource :: TryDesugar ) => {
2955+ BlockTailExpression ( .., hir:: MatchSource :: TryDesugar ( _ ) ) => {
29582956 ObligationCauseFailureCode :: TryCompat { span, subdiags }
29592957 }
29602958 MatchExpressionArm ( box MatchExpressionArmCause { source, .. } ) => match source {
2961- hir:: MatchSource :: TryDesugar => {
2959+ hir:: MatchSource :: TryDesugar ( _ ) => {
29622960 ObligationCauseFailureCode :: TryCompat { span, subdiags }
29632961 }
29642962 _ => ObligationCauseFailureCode :: MatchCompat { span, subdiags } ,
0 commit comments