Skip to content

Commit 121a5a0

Browse files
RalfJungGankra
authored andcommitted
fold uninit integer rule with reading uninit memory
1 parent 98a71fd commit 121a5a0

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/what-unsafe-does.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,11 @@ language cares about is preventing the following things:
1818

1919
* Dereferencing (using the `*` operator on) dangling, or unaligned pointers, or
2020
wide pointers with invalid metadata (see below)
21-
* Reading [uninitialized memory][]
2221
* Breaking the [pointer aliasing rules][]
2322
* Unwinding into another language
2423
* Causing a [data race][race]
2524
* Executing code compiled with target features that the current thread of execution does
26-
not support (see [`target_feature`])
25+
not support (see [`target_feature`][])
2726
* Producing invalid primitive values (either alone or as a field of a compound
2827
type such as `enum`/`struct`/array/tuple):
2928
* a `bool` that isn't 0 or 1
@@ -39,8 +38,8 @@ language cares about is preventing the following things:
3938
* `dyn Trait` metadata is invalid if it is not a pointer to a vtable for
4039
`Trait` that matches the actual dynamic trait the reference points to
4140
* a non-utf8 `str`
42-
* an uninitialized integer (`i*`/`u*`), floating point value (`f*`), or raw
43-
pointer
41+
* an integer (`i*`/`u*`), floating point value (`f*`), or raw pointer read from
42+
[uninitialized memory][]
4443
* an invalid library type with custom invalid values, such as a `NonNull` or
4544
the `NonZero` family of types, that is 0
4645

0 commit comments

Comments
 (0)