diff options
| author | Eduard-Mihai Burtescu <edy.burt@gmail.com> | 2019-03-18 12:50:57 +0200 |
|---|---|---|
| committer | Oliver Scherer <github35764891676564198441@oli-obk.de> | 2019-05-25 10:07:02 +0200 |
| commit | 89b2fb631ae4e5b6923441dea3e5d2fbd56a8478 (patch) | |
| tree | 2155f5d1235b2c1649724691007fd81509c30f1a /src/librustc_codegen_utils | |
| parent | 28198bb3bea7c7637738588eedda2191852f7796 (diff) | |
| download | rust-89b2fb631ae4e5b6923441dea3e5d2fbd56a8478.tar.gz rust-89b2fb631ae4e5b6923441dea3e5d2fbd56a8478.zip | |
rustc: integrate ty::Const into ty::print as print_const.
Diffstat (limited to 'src/librustc_codegen_utils')
| -rw-r--r-- | src/librustc_codegen_utils/symbol_names.rs | 8 |
1 files changed, 8 insertions, 0 deletions
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::Const, Self::Error> { + self.pretty_print_const(ct) + } + fn path_crate( mut self, cnum: CrateNum, |
