From 89b2fb631ae4e5b6923441dea3e5d2fbd56a8478 Mon Sep 17 00:00:00 2001 From: Eduard-Mihai Burtescu Date: Mon, 18 Mar 2019 12:50:57 +0200 Subject: rustc: integrate ty::Const into ty::print as print_const. --- src/librustc_codegen_utils/symbol_names.rs | 8 ++++++++ 1 file changed, 8 insertions(+) (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 1a8647ed197..f2f9ac8931f 100644 --- a/src/librustc_codegen_utils/symbol_names.rs +++ b/src/librustc_codegen_utils/symbol_names.rs @@ -391,6 +391,7 @@ impl Printer<'tcx, 'tcx> for SymbolPrinter<'_, 'tcx> { type Region = Self; type Type = Self; type DynExistential = Self; + type Const = Self; fn tcx(&'a self) -> TyCtxt<'a, 'tcx, 'tcx> { self.tcx @@ -436,6 +437,13 @@ impl Printer<'tcx, 'tcx> for SymbolPrinter<'_, 'tcx> { Ok(self) } + fn print_const( + self, + ct: &'tcx ty::Const<'tcx>, + ) -> Result { + self.pretty_print_const(ct) + } + fn path_crate( mut self, cnum: CrateNum, -- cgit 1.4.1-3-g733a5