Evaluate constants in SIMD vec lengths before rejecting them
This commit is contained in:
parent
c04b52ae9e
commit
6d3d61f1b0
3 changed files with 2 additions and 11 deletions
|
@ -83,6 +83,7 @@ impl<'a, 'tcx> InlineAsmCtxt<'a, 'tcx> {
|
|||
|
||||
let (size, ty) = match elem_ty.kind() {
|
||||
ty::Array(ty, len) => {
|
||||
let len = self.tcx.normalize_erasing_regions(self.typing_env, *len);
|
||||
if let Some(len) = len.try_to_target_usize(self.tcx) {
|
||||
(len, *ty)
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue