From 2a656828acc6fa619e2e83f928ca21f2281c911b Mon Sep 17 00:00:00 2001 From: Eduard-Mihai Burtescu Date: Fri, 25 Jan 2019 02:34:19 +0200 Subject: rustc: remove the ability for pretty-printers to override nesting. --- src/librustc_codegen_utils/symbol_names.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/librustc_codegen_utils') diff --git a/src/librustc_codegen_utils/symbol_names.rs b/src/librustc_codegen_utils/symbol_names.rs index 9620c3efda0..084b86b1eb4 100644 --- a/src/librustc_codegen_utils/symbol_names.rs +++ b/src/librustc_codegen_utils/symbol_names.rs @@ -445,7 +445,7 @@ impl Printer for SymbolPath { write!(self, "+")?; } first = false; - self = self.nest(|cx| p.print(cx))?; + self = PrintCx::new(self.tcx, p.print(self)?); } self.ok() } @@ -520,7 +520,7 @@ impl Printer for SymbolPath { ) -> Result, args: &[Kind<'tcx>], ) -> Result { - self = self.nest(print_prefix)?; + self = PrintCx::new(self.tcx, print_prefix(self)?); let args = args.iter().cloned().filter(|arg| { match arg.unpack() { @@ -551,10 +551,10 @@ impl PrettyPrinter for SymbolPath { where T: Print<'tcx, Self, Output = Self, Error = Self::Error> { if let Some(first) = elems.next() { - self = self.nest(|cx| first.print(cx))?; + self = PrintCx::new(self.tcx, first.print(self)?); for elem in elems { self.write_str(",")?; - self = self.nest(|cx| elem.print(cx))?; + self = PrintCx::new(self.tcx, elem.print(self)?); } } self.ok() -- cgit 1.4.1-3-g733a5