@@ -183,19 +183,18 @@ impl<'a> State<'a> {
183183
184184 pub fn bclose_maybe_open ( & mut self ,
185185 span : syntax_pos:: Span ,
186- indented : usize ,
187186 close_box : bool )
188187 {
189188 self . maybe_print_comment ( span. hi ( ) ) ;
190- self . break_offset_if_not_bol ( 1 , -( indented as isize ) ) ;
189+ self . break_offset_if_not_bol ( 1 , -( INDENT_UNIT as isize ) ) ;
191190 self . s . word ( "}" ) ;
192191 if close_box {
193192 self . end ( ) ; // close the outer-box
194193 }
195194 }
196195
197196 pub fn bclose ( & mut self , span : syntax_pos:: Span ) {
198- self . bclose_maybe_open ( span, INDENT_UNIT , true )
197+ self . bclose_maybe_open ( span, true )
199198 }
200199
201200 pub fn space_if_not_bol ( & mut self ) {
@@ -963,26 +962,18 @@ impl<'a> State<'a> {
963962 }
964963
965964 pub fn print_block_unclosed ( & mut self , blk : & hir:: Block ) {
966- self . print_block_unclosed_indent ( blk, INDENT_UNIT )
967- }
968-
969- pub fn print_block_unclosed_indent ( & mut self ,
970- blk : & hir:: Block ,
971- indented : usize )
972- {
973- self . print_block_maybe_unclosed ( blk, indented, & [ ] , false )
965+ self . print_block_maybe_unclosed ( blk, & [ ] , false )
974966 }
975967
976968 pub fn print_block_with_attrs ( & mut self ,
977969 blk : & hir:: Block ,
978970 attrs : & [ ast:: Attribute ] )
979971 {
980- self . print_block_maybe_unclosed ( blk, INDENT_UNIT , attrs, true )
972+ self . print_block_maybe_unclosed ( blk, attrs, true )
981973 }
982974
983975 pub fn print_block_maybe_unclosed ( & mut self ,
984976 blk : & hir:: Block ,
985- indented : usize ,
986977 attrs : & [ ast:: Attribute ] ,
987978 close_box : bool )
988979 {
@@ -1006,7 +997,7 @@ impl<'a> State<'a> {
1006997 self . print_expr ( & expr) ;
1007998 self . maybe_print_trailing_comment ( expr. span , Some ( blk. span . hi ( ) ) ) ;
1008999 }
1009- self . bclose_maybe_open ( blk. span , indented , close_box) ;
1000+ self . bclose_maybe_open ( blk. span , close_box) ;
10101001 self . ann . post ( self , AnnNode :: Block ( blk) )
10111002 }
10121003
@@ -1263,7 +1254,7 @@ impl<'a> State<'a> {
12631254 self . print_ident ( temp) ;
12641255
12651256 // Print `}`:
1266- self . bclose_maybe_open ( expr. span , INDENT_UNIT , true ) ;
1257+ self . bclose_maybe_open ( expr. span , true ) ;
12671258 }
12681259 hir:: ExprKind :: Loop ( ref blk, opt_label, _) => {
12691260 if let Some ( label) = opt_label {
@@ -1819,7 +1810,7 @@ impl<'a> State<'a> {
18191810 self . word_space ( ":" ) ;
18201811 }
18211812 // the block will close the pattern's ibox
1822- self . print_block_unclosed_indent ( & blk, INDENT_UNIT ) ;
1813+ self . print_block_unclosed ( & blk) ;
18231814
18241815 // If it is a user-provided unsafe block, print a comma after it
18251816 if let hir:: UnsafeBlock ( hir:: UserProvided ) = blk. rules {
0 commit comments