about summary refs log tree commit diff
path: root/src/librustc_codegen_utils
diff options
context:
space:
mode:
authorYuki Okushi <huyuumi.dev@gmail.com>2020-01-25 07:45:10 +0900
committerGitHub <noreply@github.com>2020-01-25 07:45:10 +0900
commitcbaecee87cfceb2d21413ed431321e9cf480c176 (patch)
tree1810d27e19e1c73a8af0ec1912520899b76c12bd /src/librustc_codegen_utils
parentc2d141df59703393c0c683abc259f9a8c3be041a (diff)
parent50dd8eaeb9ebbccb8b79ff30d3068d0ee337cd2f (diff)
downloadrust-cbaecee87cfceb2d21413ed431321e9cf480c176.tar.gz
rust-cbaecee87cfceb2d21413ed431321e9cf480c176.zip
Rollup merge of #68111 - varkor:const-generics-type_name, r=oli-obk
Print constants in `type_name` for const generics

Fixes https://github.com/rust-lang/rust/issues/65372.

r? @oli-obk as there may have been a deliberate decision not to in https://github.com/rust-lang/rust/commit/5b9848912a85e28d000602fc2e81bad9c2f2a981#diff-4ed1a72c0bfdf17be769ed520932cd02R80.
Diffstat (limited to 'src/librustc_codegen_utils')
-rw-r--r--src/librustc_codegen_utils/symbol_names/legacy.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/librustc_codegen_utils/symbol_names/legacy.rs b/src/librustc_codegen_utils/symbol_names/legacy.rs
index 4f5b9ce03fc..0dedda9bb6b 100644
--- a/src/librustc_codegen_utils/symbol_names/legacy.rs
+++ b/src/librustc_codegen_utils/symbol_names/legacy.rs
@@ -237,7 +237,7 @@ impl Printer<'tcx> for SymbolPrinter<'tcx> {
         // only print integers
         if let ty::ConstKind::Value(ConstValue::Scalar(Scalar::Raw { .. })) = ct.val {
             if ct.ty.is_integral() {
-                return self.pretty_print_const(ct);
+                return self.pretty_print_const(ct, true);
             }
         }
         self.write_str("_")?;