File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ language cares about is preventing the following things:
21
21
` enum ` /` struct ` /array/slice/tuple field address
22
22
* Reading [ uninitialized memory] [ ]
23
23
* Breaking the [ pointer aliasing rules] [ ]
24
- * Producing/obtaining invalid primitive values:
24
+ * Producing invalid primitive values:
25
25
* dangling/null/unaligned references
26
26
* null ` fn ` pointers
27
27
* a ` bool ` that isn't 0 or 1
@@ -33,6 +33,9 @@ language cares about is preventing the following things:
33
33
* Unwinding into another language
34
34
* Causing a [ data race] [ race ]
35
35
36
+ "Producing" a value happens any time a value is assigned, passed to a
37
+ function/primitive operation or returned from a function/primitive operation.
38
+
36
39
That's it. That's all the causes of Undefined Behavior baked into Rust. Of
37
40
course, unsafe functions and traits are free to declare arbitrary other
38
41
constraints that a program must maintain to avoid Undefined Behavior. For
You can’t perform that action at this time.
0 commit comments