about summary refs log tree commit diff
path: root/src/librustc_codegen_ssa/debuginfo
diff options
context:
space:
mode:
authorOliver Scherer <github35764891676564198441@oli-obk.de>2019-03-22 18:30:35 +0100
committerOliver Scherer <github35764891676564198441@oli-obk.de>2019-08-05 17:48:04 +0200
commit9b87d22ea83a1b5955d5355f91125456c4dc4bab (patch)
tree5d7f00e640c68d1f87e12c7f7c0a1386e57d76e9 /src/librustc_codegen_ssa/debuginfo
parent437f017e2ed2e8c60b6f4af9dc71559ca87fd645 (diff)
Don't abort on unevaluated constants without at least tryting to eval them
Diffstat (limited to 'src/librustc_codegen_ssa/debuginfo')
-rw-r--r--src/librustc_codegen_ssa/debuginfo/type_names.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/librustc_codegen_ssa/debuginfo/type_names.rs b/src/librustc_codegen_ssa/debuginfo/type_names.rs
index 8f0bb6ee198..0c1def33ad3 100644
--- a/src/librustc_codegen_ssa/debuginfo/type_names.rs
+++ b/src/librustc_codegen_ssa/debuginfo/type_names.rs
@@ -89,7 +89,7 @@ pub fn push_debuginfo_type_name<'tcx>(
         ty::Array(inner_type, len) => {
             output.push('[');
             push_debuginfo_type_name(tcx, inner_type, true, output, visited);
-            output.push_str(&format!("; {}", len.unwrap_usize(tcx)));
+            output.push_str(&format!("; {}", len.eval_usize(tcx)));
             output.push(']');
         },
         ty::Slice(inner_type) => {