Skip to content

Commit 443c96f

Browse files
committed
XXX: fix bogosity
XXX: no apparent effect on output
1 parent 43edcf4 commit 443c96f

File tree

2 files changed

+1
-19
lines changed
  • compiler
    • rustc_ast_pretty/src/pprust/state
    • rustc_hir_pretty/src

2 files changed

+1
-19
lines changed

compiler/rustc_ast_pretty/src/pprust/state/expr.rs

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ use rustc_ast::{
1313

1414
use crate::pp::Breaks::Inconsistent;
1515
use crate::pprust::state::fixup::FixupContext;
16-
use crate::pprust::state::{AnnNode, BoxMarker, INDENT_UNIT, PrintState, State};
16+
use crate::pprust::state::{AnnNode, INDENT_UNIT, PrintState, State};
1717

1818
impl<'a> State<'a> {
1919
fn print_else(&mut self, els: Option<&ast::Expr>) {
@@ -540,15 +540,6 @@ impl<'a> State<'a> {
540540
self.print_fn_params_and_ret(fn_decl, true);
541541
self.space();
542542
self.print_expr(body, FixupContext::default());
543-
// FIXME(nnethercote): this is bogus
544-
let fake_ib = BoxMarker;
545-
self.end(fake_ib); // need to close a box
546-
547-
// A box will be closed by print_expr, but we didn't want an overall
548-
// wrapper so we closed the corresponding opening. so create an
549-
// empty box to satisfy the close.
550-
// FIXME(nnethercote): this is bogus, and `print_expr` is missing
551-
let _ib = self.ibox(0);
552543
}
553544
ast::ExprKind::Block(blk, opt_label) => {
554545
if let Some(label) = opt_label {

compiler/rustc_hir_pretty/src/lib.rs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1578,15 +1578,6 @@ impl<'a> State<'a> {
15781578

15791579
// This is a bare expression.
15801580
self.ann.nested(self, Nested::Body(body));
1581-
// FIXME(nnethercote): this is bogus
1582-
let fake_ib = BoxMarker;
1583-
self.end(fake_ib); // need to close a box
1584-
1585-
// A box will be closed by `print_expr`, but we didn't want an overall
1586-
// wrapper so we closed the corresponding opening. so create an
1587-
// empty box to satisfy the close.
1588-
// FIXME(nnethercote): this is bogus, and `print_expr` is missing
1589-
let _ib = self.ibox(0);
15901581
}
15911582
hir::ExprKind::Block(blk, opt_label) => {
15921583
if let Some(label) = opt_label {

0 commit comments

Comments
 (0)