Skip to content

Commit 2e73604

Browse files
committed
reword unresolved queston about unions
1 parent f4ad981 commit 2e73604

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

reference/src/representation/vectors.md

+6-7
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ currently different for each architecture.
1414

1515
## Vector types
1616

17-
Vector types are `repr(simd)` homogeneous tuple-structs containing `N` elements of type `T`:
17+
Vector types are `repr(simd)` homogeneous tuple-structs containing `N` elements
18+
of type `T`:
1819

1920
```rust
2021
#[repr(simd)]
@@ -84,10 +85,8 @@ unsafe {
8485

8586
[#36]: https://github.com/rust-rfcs/unsafe-code-guidelines/issues/36
8687

87-
* Should unions containing a vector type and any number of ZSTs also be vector
88-
types? For example, should `MaybeUninit<Vector<T, N>>` also be a vector type?
89-
This should be documented for `unions` in general, and the rules for vectors
90-
should follow from that. This document should, at most, mention that in the
91-
context of vectors.
92-
9388
* Should we require `N` to be a power-of-two?
89+
90+
* `MaybeUninit<T>` does not have the same `repr` as `T`, so
91+
`MaybeUninit<Vector<T, N>>` are not `repr(simd)`, which has performance
92+
consequences and means that `MaybeUninit<Vector<T, N>>` is not C-FFI safe.

0 commit comments

Comments
 (0)