Closed
Description
Refiling rust-lang/rfcs#2513 here.
This probably does not require an RFC (according to me and @nrc).
However, we'd like @BurntSushi and @alexcrichton to sign off on this.
cc @rust-lang/compiler
cc @gnzlbg
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
andusize
allowed ? I currently work around this to implement simd vectors of pointers, but maybe that's broken for reason I don't understand?
Metadata
Metadata
Assignees
Labels
Area: SIMD (Single Instruction Multiple Data)Category: A feature request, i.e: not implemented / a PR.Category: An issue tracking the progress of sth. like the implementation of an RFCCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.Relevant to the language team, which will review and decide on the PR/issue.This issue / PR is in PFCP or FCP with a disposition to merge it.The final comment period is finished for this PR / Issue.