We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
PrintState::head
PrintState::block_to_string
1 parent ef0b178 commit c0ca875Copy full SHA for c0ca875
compiler/rustc_ast_pretty/src/pprust/state.rs
@@ -1013,10 +1013,7 @@ pub trait PrintState<'a>: std::ops::Deref<Target = pp::Printer> + std::ops::Dere
1013
1014
fn block_to_string(&self, blk: &ast::Block) -> String {
1015
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);
+ let (cb, ib) = s.head("");
1020
s.print_block(blk, cb, ib)
1021
})
1022
}
0 commit comments