Skip to content

Commit 1824951

Browse files
RalfJungGankra
authored andcommitted
stick to broader UB for raw ptr offsets/derefs for now
1 parent 93c626d commit 1824951

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/what-unsafe-does.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,8 @@ to your program. You definitely *should not* invoke Undefined Behavior.
1616
Unlike C, Undefined Behavior is pretty limited in scope in Rust. All the core
1717
language cares about is preventing the following things:
1818

19-
* Loading from or storing to null, dangling, or unaligned references or raw
20-
pointers
21-
* Performing out-of-bounds arithmetic for the computation of an
22-
`enum`/`struct`/array/slice/tuple field address
19+
* Dereferencing (using the `*` operator on) null, dangling, or unaligned
20+
references or raw pointers
2321
* Reading [uninitialized memory][]
2422
* Breaking the [pointer aliasing rules][]
2523
* Producing invalid primitive values (either alone or as a field of a compound

0 commit comments

Comments
 (0)