-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow generic SIMD array element type
- Loading branch information
1 parent
e3b1c12
commit b23de51
Showing
4 changed files
with
62 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
src/test/ui/simd/simd-type-generic-monomorphisation-non-primitive.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// build-fail | ||
|
||
#![feature(repr_simd)] | ||
|
||
struct E; | ||
|
||
// error-pattern:monomorphising SIMD type `S<E>` with a non-primitive-scalar (integer/float/pointer) element type `E` | ||
|
||
#[repr(simd)] | ||
struct S<T>([T; 4]); | ||
|
||
fn main() { | ||
let _v: Option<S<E>> = None; | ||
} |
4 changes: 4 additions & 0 deletions
4
src/test/ui/simd/simd-type-generic-monomorphisation-non-primitive.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
error: monomorphising SIMD type `S<E>` with a non-primitive-scalar (integer/float/pointer) element type `E` | ||
|
||
error: aborting due to previous error | ||
|