Skip to content

Commit 9605ee0

Browse files
authored
Update values.rst
1 parent 808e965 commit 9605ee0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/coding-guidelines/values.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
Values
77
======
88

9-
.. guideline:: Do not create values from uninitialized memory
9+
.. guideline:: Do not create values from or read uninitialized memory
1010
:id: gui_uyp3mCj77FS8
1111
:category: required
1212
:status: draft
@@ -17,10 +17,10 @@ Values
1717
:tags: undefined-behavior, unsafe, defect
1818

1919
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 ``()``) may hold uninitialized bytes as values,
2121
but reading any specific typed field still requires initialized and valid bytes.
2222

23-
**Exception:** You can access a field of a union when all of the following conditions are met:
23+
**Exception:** You can access a field of a ``union`` when all of the following conditions are met:
2424

2525
- All bytes of the field read have been initialized by a prior write.
2626
- The bytes form a valid representation for the field's type

0 commit comments

Comments
 (0)