@@ -1714,11 +1714,11 @@ impl<'a> State<'a> {
1714
1714
self . ann . post ( self , AnnNode :: Block ( blk) )
1715
1715
}
1716
1716
1717
- /// Print a `let pats = scrutinee` expression.
1718
- crate fn print_let ( & mut self , pats : & [ P < ast:: Pat > ] , scrutinee : & ast:: Expr ) {
1717
+ /// Print a `let pat = scrutinee` expression.
1718
+ crate fn print_let ( & mut self , pat : & ast:: Pat , scrutinee : & ast:: Expr ) {
1719
1719
self . s . word ( "let " ) ;
1720
1720
1721
- self . print_pats ( pats ) ;
1721
+ self . print_pat ( pat ) ;
1722
1722
self . s . space ( ) ;
1723
1723
1724
1724
self . word_space ( "=" ) ;
@@ -2044,8 +2044,8 @@ impl<'a> State<'a> {
2044
2044
self . word_space ( ":" ) ;
2045
2045
self . print_type ( ty) ;
2046
2046
}
2047
- ast:: ExprKind :: Let ( ref pats , ref scrutinee) => {
2048
- self . print_let ( pats , scrutinee) ;
2047
+ ast:: ExprKind :: Let ( ref pat , ref scrutinee) => {
2048
+ self . print_let ( pat , scrutinee) ;
2049
2049
}
2050
2050
ast:: ExprKind :: If ( ref test, ref blk, ref elseopt) => {
2051
2051
self . print_if ( test, blk, elseopt. as_ref ( ) . map ( |e| & * * e) ) ;
@@ -2455,21 +2455,16 @@ impl<'a> State<'a> {
2455
2455
self . ann . post ( self , AnnNode :: Pat ( pat) )
2456
2456
}
2457
2457
2458
- fn print_pats ( & mut self , pats : & [ P < ast:: Pat > ] ) {
2459
- self . strsep ( "|" , true , Inconsistent , pats, |s, p| s. print_pat ( p) ) ;
2460
- }
2461
-
2462
2458
fn print_arm ( & mut self , arm : & ast:: Arm ) {
2463
- // I have no idea why this check is necessary, but here it
2464
- // is :(
2459
+ // I have no idea why this check is necessary, but here it is :(
2465
2460
if arm. attrs . is_empty ( ) {
2466
2461
self . s . space ( ) ;
2467
2462
}
2468
2463
self . cbox ( INDENT_UNIT ) ;
2469
2464
self . ibox ( 0 ) ;
2470
- self . maybe_print_comment ( arm. pats [ 0 ] . span . lo ( ) ) ;
2465
+ self . maybe_print_comment ( arm. pat . span . lo ( ) ) ;
2471
2466
self . print_outer_attributes ( & arm. attrs ) ;
2472
- self . print_pats ( & arm. pats ) ;
2467
+ self . print_pat ( & arm. pat ) ;
2473
2468
self . s . space ( ) ;
2474
2469
if let Some ( ref e) = arm. guard {
2475
2470
self . word_space ( "if" ) ;
0 commit comments