@@ -525,11 +525,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
525
525
// Sometimes macros mess up the spans, so do not normalize the
526
526
// arg span to equal the error span, because that's less useful
527
527
// than pointing out the arg expr in the wrong context.
528
- if normalized_span. source_equal ( error_span) {
529
- span
530
- } else {
531
- normalized_span
532
- }
528
+ if normalized_span. source_equal ( error_span) { span } else { normalized_span }
533
529
} ;
534
530
535
531
// Precompute the provided types and spans, since that's all we typically need for below
@@ -782,8 +778,9 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
782
778
// can be collated pretty easily if needed.
783
779
784
780
// Next special case: if there is only one "Incompatible" error, just emit that
785
- if let [ Error :: Invalid ( provided_idx, expected_idx, Compatibility :: Incompatible ( Some ( err) ) ) ] =
786
- & errors[ ..]
781
+ if let [
782
+ Error :: Invalid ( provided_idx, expected_idx, Compatibility :: Incompatible ( Some ( err) ) ) ,
783
+ ] = & errors[ ..]
787
784
{
788
785
let ( formal_ty, expected_ty) = formal_and_expected_inputs[ * expected_idx] ;
789
786
let ( provided_ty, provided_arg_span) = provided_arg_tys[ * provided_idx] ;
@@ -1525,21 +1522,25 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
1525
1522
// Our block must be a `assign desugar local; assignment`
1526
1523
if let Some ( hir:: Node :: Block ( hir:: Block {
1527
1524
stmts :
1528
- [ hir:: Stmt {
1529
- kind :
1530
- hir:: StmtKind :: Local ( hir:: Local {
1531
- source : hir:: LocalSource :: AssignDesugar ( _) ,
1532
- ..
1533
- } ) ,
1534
- ..
1535
- } , hir:: Stmt {
1536
- kind :
1537
- hir:: StmtKind :: Expr ( hir:: Expr {
1538
- kind : hir:: ExprKind :: Assign ( ..) ,
1539
- ..
1540
- } ) ,
1541
- ..
1542
- } ] ,
1525
+ [
1526
+ hir:: Stmt {
1527
+ kind :
1528
+ hir:: StmtKind :: Local ( hir:: Local {
1529
+ source :
1530
+ hir:: LocalSource :: AssignDesugar ( _) ,
1531
+ ..
1532
+ } ) ,
1533
+ ..
1534
+ } ,
1535
+ hir:: Stmt {
1536
+ kind :
1537
+ hir:: StmtKind :: Expr ( hir:: Expr {
1538
+ kind : hir:: ExprKind :: Assign ( ..) ,
1539
+ ..
1540
+ } ) ,
1541
+ ..
1542
+ } ,
1543
+ ] ,
1543
1544
..
1544
1545
} ) ) = self . tcx . hir ( ) . find ( blk. hir_id )
1545
1546
{
0 commit comments