From 18249517362cb0f3d204a451eab5e12ae36ae8c9 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Sun, 21 Jul 2019 11:09:37 +0200 Subject: [PATCH] stick to broader UB for raw ptr offsets/derefs for now --- src/what-unsafe-does.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/what-unsafe-does.md b/src/what-unsafe-does.md index e583044..cc02dc6 100644 --- a/src/what-unsafe-does.md +++ b/src/what-unsafe-does.md @@ -16,10 +16,8 @@ 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: -* Loading from or storing to null, dangling, or unaligned references or raw - pointers -* Performing out-of-bounds arithmetic for the computation of an - `enum`/`struct`/array/slice/tuple field address +* Dereferencing (using the `*` operator on) null, dangling, or unaligned + references or raw pointers * Reading [uninitialized memory][] * Breaking the [pointer aliasing rules][] * Producing invalid primitive values (either alone or as a field of a compound