diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2025-04-29 16:52:17 +1000 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2025-05-03 09:13:28 +1000 |
| commit | 882c74dfcf974d4129b268ca1aef4de28cd6cc4e (patch) | |
| tree | f3d966c2b526e3ea7509fd7707c30b6296e50270 /compiler | |
| parent | 4824c2bb7445cb2478aab0190c268c939d77a0f6 (diff) | |
| download | rust-882c74dfcf974d4129b268ca1aef4de28cd6cc4e.tar.gz rust-882c74dfcf974d4129b268ca1aef4de28cd6cc4e.zip | |
Remove fake `BoxMarker`s.
They don't appear to do anything -- no test output is affected -- and no other pretty-printing code looks like this.
Diffstat (limited to 'compiler')
| -rw-r--r-- | compiler/rustc_ast_pretty/src/pprust/state/expr.rs | 11 | ||||
| -rw-r--r-- | compiler/rustc_hir_pretty/src/lib.rs | 9 |
2 files changed, 1 insertions, 19 deletions
diff --git a/compiler/rustc_ast_pretty/src/pprust/state/expr.rs b/compiler/rustc_ast_pretty/src/pprust/state/expr.rs index 38cadc77b77..abcbb88aab2 100644 --- a/compiler/rustc_ast_pretty/src/pprust/state/expr.rs +++ b/compiler/rustc_ast_pretty/src/pprust/state/expr.rs @@ -13,7 +13,7 @@ use rustc_ast::{ use crate::pp::Breaks::Inconsistent; use crate::pprust::state::fixup::FixupContext; -use crate::pprust::state::{AnnNode, BoxMarker, INDENT_UNIT, PrintState, State}; +use crate::pprust::state::{AnnNode, INDENT_UNIT, PrintState, State}; impl<'a> State<'a> { fn print_else(&mut self, els: Option<&ast::Expr>) { @@ -542,15 +542,6 @@ impl<'a> State<'a> { self.print_fn_params_and_ret(fn_decl, true); self.space(); self.print_expr(body, FixupContext::default()); - // FIXME(nnethercote): Bogus. Reduce visibility of `ended` once it's fixed. - let fake_ib = BoxMarker; - self.end(fake_ib); - - // A box will be closed by print_expr, but we didn't want an overall - // wrapper so we closed the corresponding opening. so create an - // empty box to satisfy the close. - // FIXME(nnethercote): Bogus. - let _ib = self.ibox(0); } ast::ExprKind::Block(blk, opt_label) => { if let Some(label) = opt_label { diff --git a/compiler/rustc_hir_pretty/src/lib.rs b/compiler/rustc_hir_pretty/src/lib.rs index 15e997aebcb..4035de95715 100644 --- a/compiler/rustc_hir_pretty/src/lib.rs +++ b/compiler/rustc_hir_pretty/src/lib.rs @@ -1572,15 +1572,6 @@ impl<'a> State<'a> { // This is a bare expression. self.ann.nested(self, Nested::Body(body)); - // FIXME(nnethercote): this is bogus - let fake_ib = BoxMarker; - self.end(fake_ib); - - // A box will be closed by `print_expr`, but we didn't want an overall - // wrapper so we closed the corresponding opening. so create an - // empty box to satisfy the close. - // FIXME(nnethercote): this is bogus, and `print_expr` is missing - let _ib = self.ibox(0); } hir::ExprKind::Block(blk, opt_label) => { if let Some(label) = opt_label { |
