Closed
Description
Repro (playground: https://play.rust-lang.org/?gist=efa6e5caf752ccca651014ae5009feb8&version=nightly&mode=debug&edition=2015):
#![feature(repr_simd)]
#[repr(simd)] struct A(isize, isize); // ERROR
#[cfg(target_pointer_width = "64")]
type isize_ = i64;
#[cfg(target_pointer_width = "32")]
type isize_ = i32;
#[repr(simd)] struct B(isize_, isize_); // Q: Is this ok?
produces
error[E0077]: SIMD vector element type should be machine type
--> src/main.rs:3:15
|
3 | #[repr(simd)] struct A(isize, isize);
| ^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to previous error
I am wondering why aren't isize
and usize
allowed ? I currently work around this to implement simd vectors of pointers, but maybe that's broken for reason I don't understand?