You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/coding-guidelines/values.rst
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,7 +17,8 @@ Values
17
17
:tags: undefined-behavior, unsafe, defect
18
18
19
19
Do not create a typed value from uninitialized memory.
20
-
Types that explicitly permit an uninitialized state (e.g., ``MaybeUninit<T>`` or a ``union`` that includes ``()``) may hold uninitialized bytes as values,
20
+
Types that explicitly permit an uninitialized state (e.g., ``MaybeUninit<T>`` or a ``union`` that includes ``()``)
21
+
may hold uninitialized bytes as values,
21
22
but reading any specific typed field still requires initialized and valid bytes.
22
23
23
24
**Exception:** You can access a field of a ``union`` when all of the following conditions are met:
0 commit comments