@@ -366,10 +366,6 @@ pub trait PrintState<'a>: std::ops::Deref<Target = pp::Printer> + std::ops::Dere
366366 self . print_either_attributes ( attrs, ast:: AttrStyle :: Inner , false , true )
367367 }
368368
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-
373369 fn print_outer_attributes ( & mut self , attrs : & [ ast:: Attribute ] ) {
374370 self . print_either_attributes ( attrs, ast:: AttrStyle :: Outer , false , true )
375371 }
@@ -1675,32 +1671,24 @@ impl<'a> State<'a> {
16751671 }
16761672 }
16771673
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 > ] ) {
16791675 self . ibox ( INDENT_UNIT ) ;
16801676 self . s . word ( "[" ) ;
1681- self . print_inner_attributes_inline ( attrs) ;
16821677 self . commasep_exprs ( Inconsistent , exprs) ;
16831678 self . s . word ( "]" ) ;
16841679 self . end ( ) ;
16851680 }
16861681
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 ) {
16881683 self . ibox ( INDENT_UNIT ) ;
16891684 self . s . word ( "const" ) ;
1690- self . print_inner_attributes_inline ( attrs) ;
16911685 self . print_expr ( & expr. value ) ;
16921686 self . end ( ) ;
16931687 }
16941688
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 ) {
17011690 self . ibox ( INDENT_UNIT ) ;
17021691 self . s . word ( "[" ) ;
1703- self . print_inner_attributes_inline ( attrs) ;
17041692 self . print_expr ( element) ;
17051693 self . word_space ( ";" ) ;
17061694 self . print_expr ( & count. value ) ;
@@ -1713,11 +1701,9 @@ impl<'a> State<'a> {
17131701 path : & ast:: Path ,
17141702 fields : & [ ast:: ExprField ] ,
17151703 rest : & ast:: StructRest ,
1716- attrs : & [ ast:: Attribute ] ,
17171704 ) {
17181705 self . print_path ( path, true , 0 ) ;
17191706 self . s . word ( "{" ) ;
1720- self . print_inner_attributes_inline ( attrs) ;
17211707 self . commasep_cmnt (
17221708 Consistent ,
17231709 fields,
@@ -1752,9 +1738,8 @@ impl<'a> State<'a> {
17521738 self . s . word ( "}" ) ;
17531739 }
17541740
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 > ] ) {
17561742 self . popen ( ) ;
1757- self . print_inner_attributes_inline ( attrs) ;
17581743 self . commasep_exprs ( Inconsistent , exprs) ;
17591744 if exprs. len ( ) == 1 {
17601745 self . s . word ( "," ) ;
@@ -1865,19 +1850,19 @@ impl<'a> State<'a> {
18651850 self . print_expr_maybe_paren ( expr, parser:: PREC_PREFIX ) ;
18661851 }
18671852 ast:: ExprKind :: Array ( ref exprs) => {
1868- self . print_expr_vec ( & exprs[ .. ] , attrs ) ;
1853+ self . print_expr_vec ( exprs) ;
18691854 }
18701855 ast:: ExprKind :: ConstBlock ( ref anon_const) => {
1871- self . print_expr_anon_const ( anon_const, attrs ) ;
1856+ self . print_expr_anon_const ( anon_const) ;
18721857 }
18731858 ast:: ExprKind :: Repeat ( ref element, ref count) => {
1874- self . print_expr_repeat ( element, count, attrs ) ;
1859+ self . print_expr_repeat ( element, count) ;
18751860 }
18761861 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 ) ;
18781863 }
18791864 ast:: ExprKind :: Tup ( ref exprs) => {
1880- self . print_expr_tup ( & exprs[ .. ] , attrs ) ;
1865+ self . print_expr_tup ( exprs) ;
18811866 }
18821867 ast:: ExprKind :: Call ( ref func, ref args) => {
18831868 self . print_expr_call ( func, & args[ ..] ) ;
@@ -1955,7 +1940,6 @@ impl<'a> State<'a> {
19551940 self . print_expr_as_cond ( expr) ;
19561941 self . s . space ( ) ;
19571942 self . bopen ( ) ;
1958- self . print_inner_attributes_no_trailing_hardbreak ( attrs) ;
19591943 for arm in arms {
19601944 self . print_arm ( arm) ;
19611945 }
@@ -2253,7 +2237,6 @@ impl<'a> State<'a> {
22532237 ast:: ExprKind :: MacCall ( ref m) => self . print_mac ( m) ,
22542238 ast:: ExprKind :: Paren ( ref e) => {
22552239 self . popen ( ) ;
2256- self . print_inner_attributes_inline ( attrs) ;
22572240 self . print_expr ( e) ;
22582241 self . pclose ( ) ;
22592242 }
0 commit comments