summary refs log tree commit diff
path: root/src/librustc_codegen_utils
diff options
context:
space:
mode:
authorEduard-Mihai Burtescu <edy.burt@gmail.com>2019-01-25 02:34:19 +0200
committerEduard-Mihai Burtescu <edy.burt@gmail.com>2019-03-15 13:25:10 +0200
commit2a656828acc6fa619e2e83f928ca21f2281c911b (patch)
treecf82d6de5fb6653e0acb934a5247cfa69480e60e /src/librustc_codegen_utils
parentc0c485c3ad7017c99137d8c9bc9afc729e7db534 (diff)
downloadrust-2a656828acc6fa619e2e83f928ca21f2281c911b.tar.gz
rust-2a656828acc6fa619e2e83f928ca21f2281c911b.zip
rustc: remove the ability for pretty-printers to override nesting.
Diffstat (limited to 'src/librustc_codegen_utils')
-rw-r--r--src/librustc_codegen_utils/symbol_names.rs8
1 files changed, 4 insertions, 4 deletions
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<Self::Path, Self::Error>,
         args: &[Kind<'tcx>],
     )  -> Result<Self::Path, Self::Error> {
-        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()