From c113664204a990c73649a03a18f354f7f8ab3c30 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Wed, 24 Jul 2019 12:10:34 +0200 Subject: [PATCH] mention ! --- src/what-unsafe-does.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/what-unsafe-does.md b/src/what-unsafe-does.md index 873b190..538f523 100644 --- a/src/what-unsafe-does.md +++ b/src/what-unsafe-does.md @@ -22,13 +22,14 @@ language cares about is preventing the following things: * Breaking the [pointer aliasing rules][] * Producing invalid primitive values (either alone or as a field of a compound type such as `enum`/`struct`/array/tuple): - * dangling/null/unaligned references, references that do themselves point to - invalid values, or fat references (to a dynamically sized type) with - invalid metadata - * null `fn` pointers * a `bool` that isn't 0 or 1 * an undefined `enum` discriminant + * null `fn` pointers * a `char` outside the ranges [0x0, 0xD7FF] and [0xE000, 0x10FFFF] + * a `!` (all values are invalid for this type) + * dangling/null/unaligned references, references that do themselves point to + invalid values, or fat references (to a dynamically sized type) with + invalid metadata * a non-utf8 `str` * an uninitialized integer (`i*`/`u*`) or floating point value (`f*`) * an invalid library type with custom invalid values, such as a `NonNull` or