File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -46,10 +46,10 @@ language cares about is preventing the following things:
46
46
"Producing" a value happens any time a value is assigned, passed to a
47
47
function/primitive operation or returned from a function/primitive operation.
48
48
49
- A reference/pointer is "dangling" if not all of the bytes it points to are part
50
- of the same allocation. In particular, null pointers are dangling. The span of bytes it
51
- points to is determined by the pointer value and the size of the pointee type.
52
- If the span is empty, "dangling" is the same as "non-null".
49
+ A reference/pointer is "dangling" if it is null or not all of the bytes it
50
+ points to are part of the same allocation. The span of bytes it points to is
51
+ determined by the pointer value and the size of the pointee type. If the span
52
+ is empty, "dangling" is the same as "non-null".
53
53
54
54
That's it. That's all the causes of Undefined Behavior baked into Rust. Of
55
55
course, unsafe functions and traits are free to declare arbitrary other
You can’t perform that action at this time.
0 commit comments