@@ -57,45 +57,46 @@ values.
57
57
To start, we will create threads for each major category of types.
58
58
59
59
* 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 ` ?
63
64
64
65
* 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?
67
68
68
69
* 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
78
79
79
80
* 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?
82
83
83
84
* 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.
86
87
87
88
* 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.
91
92
92
93
* 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?
99
100
100
101
[ RFC2582 ] : https://github.com/rust-lang/rfcs/pull/2582
101
102
[ generators-maybe-uninit ] : https://github.com/rust-lang/rust/pull/56100
0 commit comments