Don't abort on unevaluated constants without at least tryting to eval them
This commit is contained in:
parent
437f017e2e
commit
9b87d22ea8
33 changed files with 80 additions and 64 deletions
|
|
@ -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
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue