stick to broader UB for raw ptr offsets/derefs for now

pull/158/head
Ralf Jung 6 years ago committed by Alexis Beingessner
parent 93c626d0d0
commit 1824951736

@ -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 Unlike C, Undefined Behavior is pretty limited in scope in Rust. All the core
language cares about is preventing the following things: language cares about is preventing the following things:
* Loading from or storing to null, dangling, or unaligned references or raw * Dereferencing (using the `*` operator on) null, dangling, or unaligned
pointers references or raw pointers
* Performing out-of-bounds arithmetic for the computation of an
`enum`/`struct`/array/slice/tuple field address
* Reading [uninitialized memory][] * Reading [uninitialized memory][]
* Breaking the [pointer aliasing rules][] * Breaking the [pointer aliasing rules][]
* Producing invalid primitive values (either alone or as a field of a compound * Producing invalid primitive values (either alone or as a field of a compound

Loading…
Cancel
Save