Skip to content

Commit 49b1470

Browse files
committed
Union current state. III. Discussion record.
1 parent 36661ec commit 49b1470

File tree

1 file changed

+27
-1
lines changed

1 file changed

+27
-1
lines changed

active_discussion/unions.md

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,29 @@
11
# Unions
22

3-
TBD
3+
## Outstanding questions
4+
5+
* Is `#[repr(Rust)]` the bag-o-bytes union repr, or do we want to propose a new repr?
6+
* *Discussion:* [#73: Validity of unions][#73]
7+
* The following questions are all implicitly answered if `#[repr(Rust)]` is the bag-o-bytes repr, but remain open if not:
8+
* Do `#[repr(Rust)]` unions guarantee all fields at offset 0?
9+
* *Discussion*: [#353: Offsets of union fields][#353]
10+
* Do `#[repr(Rust)]` unions have internal padding?
11+
* *Discussion*: [#354: Do #[repr(Rust)] unions have internal padding?][#354]
12+
* Do `#[repr(transparent)]` unions ever have niches?
13+
* *Discussion*: [#364: What is the value model/validity invariant for transparent unions?][#364]
14+
15+
## Closed discussion issues:
16+
17+
* [#13: Representation of unions][#13]
18+
* [#156: Layout of repr(C) unions has padding][#156]
19+
* [#298: Is `repr(transparent)` completely transparent within `repr(Rust)` types?][#298]
20+
* [#352: What is the safety invariant, if any, for unions?][#352]
21+
22+
[#13]: https://github.com/rust-lang/unsafe-code-guidelines/issues/13
23+
[#156]: https://github.com/rust-lang/unsafe-code-guidelines/issues/156
24+
[#298]: https://github.com/rust-lang/unsafe-code-guidelines/issues/298
25+
[#352]: https://github.com/rust-lang/unsafe-code-guidelines/issues/352
26+
[#353]: https://github.com/rust-lang/unsafe-code-guidelines/issues/353
27+
[#354]: https://github.com/rust-lang/unsafe-code-guidelines/issues/354
28+
[#364]: https://github.com/rust-lang/unsafe-code-guidelines/issues/364
29+
[#73]: https://github.com/rust-lang/unsafe-code-guidelines/issues/73

0 commit comments

Comments
 (0)