File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 88
99.. guideline :: Do not create values from uninitialized memory
1010 :id: gui_uyp3mCj77FS8
11- :category: mandatory
11+ :category: required
1212 :status: draft
1313 :release: <TODO>
1414 :fls: fls_6lg0oaaopc26
1515 :decidability: undecidable
1616 :scope: system
1717 :tags: undefined-behavior, unsafe
1818
19- A program shall not create a typed value from uninitialized memory.
19+ Do not create a typed value from uninitialized memory.
2020 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
3030 :id: rat_kjFRrhpS8Wu6
3131 :status: draft
3232
33- Rust’s memory model treats all types as having an invariant that all bytes must be initialized before a value may be constructed.
33+ Rust’s memory model requires that all bytes are initialized before a typed value may be constructed.
3434 Reading uninitialized memory:
3535
3636 - creates undefined behavior for most types,
You can’t perform that action at this time.
0 commit comments