From 5e082af6817dfa72a3ce6cf89b723ef6dd7585fc Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Sun, 25 Aug 2019 12:17:22 +0200 Subject: [PATCH] adjust for current reality wrt. wide raw pointers --- src/what-unsafe-does.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/what-unsafe-does.md b/src/what-unsafe-does.md index 49cf121..36b3488 100644 --- a/src/what-unsafe-does.md +++ b/src/what-unsafe-does.md @@ -16,8 +16,7 @@ to your program. You definitely *should not* invoke Undefined Behavior. Unlike C, Undefined Behavior is pretty limited in scope in Rust. All the core language cares about is preventing the following things: -* Dereferencing (using the `*` operator on) dangling, or unaligned pointers, or - wide pointers with invalid metadata (see below) +* Dereferencing (using the `*` operator on) dangling or unaligned pointers (see below) * Breaking the [pointer aliasing rules][] * Unwinding into another language * Causing a [data race][race] @@ -36,6 +35,7 @@ language cares about is preventing the following things: `isize::MAX` bytes in memory * `dyn Trait` metadata is invalid if it is not a pointer to a vtable for `Trait` that matches the actual dynamic trait the reference points to + * a wide raw pointer that has invalid metadata (see above) * a `str` that isn't valid UTF-8 * an integer (`i*`/`u*`), floating point value (`f*`), or raw pointer read from [uninitialized memory][]