Skip to content

Commit c113664

Browse files
RalfJungGankra
authored andcommitted
mention !
1 parent 01d11b8 commit c113664

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/what-unsafe-does.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,14 @@ language cares about is preventing the following things:
2222
* Breaking the [pointer aliasing rules][]
2323
* Producing invalid primitive values (either alone or as a field of a compound
2424
type such as `enum`/`struct`/array/tuple):
25-
* dangling/null/unaligned references, references that do themselves point to
26-
invalid values, or fat references (to a dynamically sized type) with
27-
invalid metadata
28-
* null `fn` pointers
2925
* a `bool` that isn't 0 or 1
3026
* an undefined `enum` discriminant
27+
* null `fn` pointers
3128
* a `char` outside the ranges [0x0, 0xD7FF] and [0xE000, 0x10FFFF]
29+
* a `!` (all values are invalid for this type)
30+
* dangling/null/unaligned references, references that do themselves point to
31+
invalid values, or fat references (to a dynamically sized type) with
32+
invalid metadata
3233
* a non-utf8 `str`
3334
* an uninitialized integer (`i*`/`u*`) or floating point value (`f*`)
3435
* an invalid library type with custom invalid values, such as a `NonNull` or

0 commit comments

Comments
 (0)