Don't abort on unevaluated constants without at least tryting to eval them
This commit is contained in:
@@ -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
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user