diff options
| author | Eduard-Mihai Burtescu <edy.burt@gmail.com> | 2019-01-14 19:56:46 +0200 |
|---|---|---|
| committer | Eduard-Mihai Burtescu <edy.burt@gmail.com> | 2019-03-15 13:25:10 +0200 |
| commit | 35e5123f5168102eed3b3c8e1d7ab36e6f90d53b (patch) | |
| tree | a66c7371fd9315f138182d462e58d5581f485a89 /src/librustc_codegen_utils | |
| parent | 88d96b269c77a0de2c143c797aeb61e928f32e03 (diff) | |
| download | rust-35e5123f5168102eed3b3c8e1d7ab36e6f90d53b.tar.gz rust-35e5123f5168102eed3b3c8e1d7ab36e6f90d53b.zip | |
rustc: support overriding type printing in ty::print::Printer.
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 912f8149513..f3af2425820 100644 --- a/src/librustc_codegen_utils/symbol_names.rs +++ b/src/librustc_codegen_utils/symbol_names.rs @@ -410,6 +410,7 @@ impl Printer for SymbolPath { type Path = Self; type Region = Self; + type Type = Self; fn print_region( self: PrintCx<'_, '_, '_, Self>, @@ -418,6 +419,13 @@ impl Printer for SymbolPath { Ok(self.printer) } + fn print_type( + self: PrintCx<'_, '_, 'tcx, Self>, + ty: Ty<'tcx>, + ) -> Result<Self::Type, Self::Error> { + self.pretty_print_type(ty) + } + fn path_crate( mut self: PrintCx<'_, '_, '_, Self>, cnum: CrateNum, |
