Skip to content

Commit 8888c18

Browse files
authored
fix enumeration
1 parent d91f004 commit 8888c18

File tree

1 file changed

+28
-27
lines changed

1 file changed

+28
-27
lines changed

active_discussion/validity.md

+28-27
Original file line numberDiff line numberDiff line change
@@ -57,45 +57,46 @@ values.
5757
To start, we will create threads for each major category of types.
5858

5959
* Integers and floating point types
60-
** Do we allow values that contain uninitialized bits? If yes, what are the
61-
rules for arithmetic and logical operations involving uninitialized bits,
62-
e.g. in cases like `x * 0`?
60+
61+
* Do we allow values that contain uninitialized bits? If yes, what are the
62+
rules for arithmetic and logical operations involving uninitialized bits,
63+
e.g. in cases like `x * 0`?
6364

6465
* Raw pointers
65-
** Do we allow values that contain uninitialized bits?
66-
** Are there any requirements on the metadata?
66+
* Do we allow values that contain uninitialized bits?
67+
* Are there any requirements on the metadata?
6768

6869
* References
69-
** Presumably, references must be non-NULL.
70-
** They probably also must be aligned, but is that required every time a
71-
reference is taken? Also see the [ongoing discussion in RFC 2582][RFC2582].
72-
** Can there ever be uninitialized bits in a reference?
73-
** Do they have to be dereferencable? What exactly does that even mean?
74-
** Does `&[mut] T` have to point to data that is valid at `T`? This interacts
75-
with the question of whether `&*x` is allowed when `x` is a well-aligned
76-
non-null dereferencable pointer that points to invalid data.
77-
** Out of scope: aliasing rules
70+
* Presumably, references must be non-NULL.
71+
* They probably also must be aligned, but is that required every time a
72+
reference is taken? Also see the [ongoing discussion in RFC 2582][RFC2582].
73+
* Can there ever be uninitialized bits in a reference?
74+
* Do they have to be dereferencable? What exactly does that even mean?
75+
* Does `&[mut] T` have to point to data that is valid at `T`? This interacts
76+
with the question of whether `&*x` is allowed when `x` is a well-aligned
77+
non-null dereferencable pointer that points to invalid data.
78+
* Out of scope: aliasing rules
7879

7980
* Function pointers
80-
** Presumably, these must be non-NULL. Anything else? Can there ever be
81-
uninitialized bits?
81+
* Presumably, these must be non-NULL. Anything else? Can there ever be
82+
uninitialized bits?
8283

8384
* Unions
84-
** Do we make any restrictions here, or are unions just "bags of bits" that may
85-
contain anything? That would mean we can do no layout optimizations.
85+
* Do we make any restrictions here, or are unions just "bags of bits" that may
86+
contain anything? That would mean we can do no layout optimizations.
8687

8788
* Enums
88-
** Is there anything to say besides: The discriminant must be valid, and all
89-
fields of the active variant must be valid at their respective types?
90-
** The padding between fields can be anything, including uninitialized.
89+
* Is there anything to say besides: The discriminant must be valid, and all
90+
fields of the active variant must be valid at their respective types?
91+
* The padding between fields can be anything, including uninitialized.
9192

9293
* Structs, tuples, arrays and all other aggregates (closures, ...)
93-
** Is there anything to say besides: All fields must be valid at their
94-
respective types?
95-
** The padding between fields can be anything, including uninitialized. It was
96-
** [recently determined][generators-maybe-uninit] that generators behave
97-
** different from other aggregates here. Are we okay with that? Should we push
98-
** for generator fields to reflect this in their types?
94+
* Is there anything to say besides: All fields must be valid at their
95+
respective types?
96+
* The padding between fields can be anything, including uninitialized. It was
97+
* [recently determined][generators-maybe-uninit] that generators behave
98+
* different from other aggregates here. Are we okay with that? Should we push
99+
* for generator fields to reflect this in their types?
99100

100101
[RFC2582]: https://github.com/rust-lang/rfcs/pull/2582
101102
[generators-maybe-uninit]: https://github.com/rust-lang/rust/pull/56100

0 commit comments

Comments
 (0)