@@ -366,10 +366,6 @@ pub trait PrintState<'a>: std::ops::Deref<Target = pp::Printer> + std::ops::Dere
366
366
self . print_either_attributes ( attrs, ast:: AttrStyle :: Inner , false , true )
367
367
}
368
368
369
- fn print_inner_attributes_no_trailing_hardbreak ( & mut self , attrs : & [ ast:: Attribute ] ) {
370
- self . print_either_attributes ( attrs, ast:: AttrStyle :: Inner , false , false )
371
- }
372
-
373
369
fn print_outer_attributes ( & mut self , attrs : & [ ast:: Attribute ] ) {
374
370
self . print_either_attributes ( attrs, ast:: AttrStyle :: Outer , false , true )
375
371
}
@@ -1675,32 +1671,24 @@ impl<'a> State<'a> {
1675
1671
}
1676
1672
}
1677
1673
1678
- fn print_expr_vec ( & mut self , exprs : & [ P < ast:: Expr > ] , attrs : & [ ast :: Attribute ] ) {
1674
+ fn print_expr_vec ( & mut self , exprs : & [ P < ast:: Expr > ] ) {
1679
1675
self . ibox ( INDENT_UNIT ) ;
1680
1676
self . s . word ( "[" ) ;
1681
- self . print_inner_attributes_inline ( attrs) ;
1682
1677
self . commasep_exprs ( Inconsistent , exprs) ;
1683
1678
self . s . word ( "]" ) ;
1684
1679
self . end ( ) ;
1685
1680
}
1686
1681
1687
- fn print_expr_anon_const ( & mut self , expr : & ast:: AnonConst , attrs : & [ ast :: Attribute ] ) {
1682
+ fn print_expr_anon_const ( & mut self , expr : & ast:: AnonConst ) {
1688
1683
self . ibox ( INDENT_UNIT ) ;
1689
1684
self . s . word ( "const" ) ;
1690
- self . print_inner_attributes_inline ( attrs) ;
1691
1685
self . print_expr ( & expr. value ) ;
1692
1686
self . end ( ) ;
1693
1687
}
1694
1688
1695
- fn print_expr_repeat (
1696
- & mut self ,
1697
- element : & ast:: Expr ,
1698
- count : & ast:: AnonConst ,
1699
- attrs : & [ ast:: Attribute ] ,
1700
- ) {
1689
+ fn print_expr_repeat ( & mut self , element : & ast:: Expr , count : & ast:: AnonConst ) {
1701
1690
self . ibox ( INDENT_UNIT ) ;
1702
1691
self . s . word ( "[" ) ;
1703
- self . print_inner_attributes_inline ( attrs) ;
1704
1692
self . print_expr ( element) ;
1705
1693
self . word_space ( ";" ) ;
1706
1694
self . print_expr ( & count. value ) ;
@@ -1713,11 +1701,9 @@ impl<'a> State<'a> {
1713
1701
path : & ast:: Path ,
1714
1702
fields : & [ ast:: ExprField ] ,
1715
1703
rest : & ast:: StructRest ,
1716
- attrs : & [ ast:: Attribute ] ,
1717
1704
) {
1718
1705
self . print_path ( path, true , 0 ) ;
1719
1706
self . s . word ( "{" ) ;
1720
- self . print_inner_attributes_inline ( attrs) ;
1721
1707
self . commasep_cmnt (
1722
1708
Consistent ,
1723
1709
fields,
@@ -1752,9 +1738,8 @@ impl<'a> State<'a> {
1752
1738
self . s . word ( "}" ) ;
1753
1739
}
1754
1740
1755
- fn print_expr_tup ( & mut self , exprs : & [ P < ast:: Expr > ] , attrs : & [ ast :: Attribute ] ) {
1741
+ fn print_expr_tup ( & mut self , exprs : & [ P < ast:: Expr > ] ) {
1756
1742
self . popen ( ) ;
1757
- self . print_inner_attributes_inline ( attrs) ;
1758
1743
self . commasep_exprs ( Inconsistent , exprs) ;
1759
1744
if exprs. len ( ) == 1 {
1760
1745
self . s . word ( "," ) ;
@@ -1865,19 +1850,19 @@ impl<'a> State<'a> {
1865
1850
self . print_expr_maybe_paren ( expr, parser:: PREC_PREFIX ) ;
1866
1851
}
1867
1852
ast:: ExprKind :: Array ( ref exprs) => {
1868
- self . print_expr_vec ( & exprs[ .. ] , attrs ) ;
1853
+ self . print_expr_vec ( exprs) ;
1869
1854
}
1870
1855
ast:: ExprKind :: ConstBlock ( ref anon_const) => {
1871
- self . print_expr_anon_const ( anon_const, attrs ) ;
1856
+ self . print_expr_anon_const ( anon_const) ;
1872
1857
}
1873
1858
ast:: ExprKind :: Repeat ( ref element, ref count) => {
1874
- self . print_expr_repeat ( element, count, attrs ) ;
1859
+ self . print_expr_repeat ( element, count) ;
1875
1860
}
1876
1861
ast:: ExprKind :: Struct ( ref se) => {
1877
- self . print_expr_struct ( & se. path , & se. fields , & se. rest , attrs ) ;
1862
+ self . print_expr_struct ( & se. path , & se. fields , & se. rest ) ;
1878
1863
}
1879
1864
ast:: ExprKind :: Tup ( ref exprs) => {
1880
- self . print_expr_tup ( & exprs[ .. ] , attrs ) ;
1865
+ self . print_expr_tup ( exprs) ;
1881
1866
}
1882
1867
ast:: ExprKind :: Call ( ref func, ref args) => {
1883
1868
self . print_expr_call ( func, & args[ ..] ) ;
@@ -1955,7 +1940,6 @@ impl<'a> State<'a> {
1955
1940
self . print_expr_as_cond ( expr) ;
1956
1941
self . s . space ( ) ;
1957
1942
self . bopen ( ) ;
1958
- self . print_inner_attributes_no_trailing_hardbreak ( attrs) ;
1959
1943
for arm in arms {
1960
1944
self . print_arm ( arm) ;
1961
1945
}
@@ -2253,7 +2237,6 @@ impl<'a> State<'a> {
2253
2237
ast:: ExprKind :: MacCall ( ref m) => self . print_mac ( m) ,
2254
2238
ast:: ExprKind :: Paren ( ref e) => {
2255
2239
self . popen ( ) ;
2256
- self . print_inner_attributes_inline ( attrs) ;
2257
2240
self . print_expr ( e) ;
2258
2241
self . pclose ( ) ;
2259
2242
}
0 commit comments