Skip to content

Commit 6596772

Browse files
RalfJungGankra
authored andcommitted
resolve some nits
1 parent 929fd20 commit 6596772

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/what-unsafe-does.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,13 @@ Unlike C, Undefined Behavior is pretty limited in scope in Rust. All the core
1717
language cares about is preventing the following things:
1818

1919
* Dereferencing (using the `*` operator on) null, dangling, or unaligned
20-
pointers, or fat pointers with invalid metadata (see below)
20+
pointers, or wide pointers with invalid metadata (see below)
2121
* Reading [uninitialized memory][]
2222
* Breaking the [pointer aliasing rules][]
23+
* Unwinding into another language
24+
* Causing a [data race][race]
25+
* Executing code compiled with target features that the current thread of execution does
26+
not support (see [`target_feature`])
2327
* Producing invalid primitive values (either alone or as a field of a compound
2428
type such as `enum`/`struct`/array/tuple):
2529
* a `bool` that isn't 0 or 1
@@ -28,7 +32,7 @@ language cares about is preventing the following things:
2832
* a `char` outside the ranges [0x0, 0xD7FF] and [0xE000, 0x10FFFF]
2933
* a `!` (all values are invalid for this type)
3034
* dangling/null/unaligned references, references that do themselves point to
31-
invalid values, or fat references (to a dynamically sized type) with
35+
invalid values, or wide references (to a dynamically sized type) with
3236
invalid metadata
3337
* slice metadata is invalid if the slice has a total size larger than
3438
`isize::MAX` bytes in memory
@@ -38,11 +42,7 @@ language cares about is preventing the following things:
3842
* an uninitialized integer (`i*`/`u*`), floating point value (`f*`), or raw
3943
pointer
4044
* an invalid library type with custom invalid values, such as a `NonNull` or
41-
`NonZero*` that is 0
42-
* Unwinding into another language
43-
* Causing a [data race][race]
44-
* Executing code compiled with target features that the current thread of execution does
45-
not support (see [`target_feature`])
45+
the `NonZero` family of types, that is 0
4646

4747
"Producing" a value happens any time a value is assigned, passed to a
4848
function/primitive operation or returned from a function/primitive operation.

0 commit comments

Comments
 (0)