about summary refs log tree commit diff
path: root/src/librustc_codegen_llvm
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_llvm
parent437f017e2ed2e8c60b6f4af9dc71559ca87fd645 (diff)
downloadrust-9b87d22ea83a1b5955d5355f91125456c4dc4bab.tar.gz
rust-9b87d22ea83a1b5955d5355f91125456c4dc4bab.zip
Don't abort on unevaluated constants without at least tryting to eval them
Diffstat (limited to 'src/librustc_codegen_llvm')
-rw-r--r--src/librustc_codegen_llvm/debuginfo/metadata.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/librustc_codegen_llvm/debuginfo/metadata.rs b/src/librustc_codegen_llvm/debuginfo/metadata.rs
index f0bdb0018ef..f07f2dc3aa7 100644
--- a/src/librustc_codegen_llvm/debuginfo/metadata.rs
+++ b/src/librustc_codegen_llvm/debuginfo/metadata.rs
@@ -341,7 +341,7 @@ fn fixed_vec_metadata(
     let (size, align) = cx.size_and_align_of(array_or_slice_type);
 
     let upper_bound = match array_or_slice_type.sty {
-        ty::Array(_, len) => len.unwrap_usize(cx.tcx) as c_longlong,
+        ty::Array(_, len) => len.eval_usize(cx.tcx) as c_longlong,
         _ => -1
     };