Skip to content

Commit c0ca875

Browse files
committed
Use PrintState::head in PrintState::block_to_string.
1 parent ef0b178 commit c0ca875

File tree

1 file changed

+1
-4
lines changed
  • compiler/rustc_ast_pretty/src/pprust

1 file changed

+1
-4
lines changed

compiler/rustc_ast_pretty/src/pprust/state.rs

+1-4
Original file line numberDiff line numberDiff line change
@@ -1013,10 +1013,7 @@ pub trait PrintState<'a>: std::ops::Deref<Target = pp::Printer> + std::ops::Dere
10131013

10141014
fn block_to_string(&self, blk: &ast::Block) -> String {
10151015
Self::to_string(|s| {
1016-
// Containing cbox, will be closed by `print_block` at `}`.
1017-
let cb = s.cbox(INDENT_UNIT);
1018-
// Head-ibox, will be closed by `print_block` after `{`.
1019-
let ib = s.ibox(0);
1016+
let (cb, ib) = s.head("");
10201017
s.print_block(blk, cb, ib)
10211018
})
10221019
}

0 commit comments

Comments
 (0)