Define 'producing'

pull/158/head
Ralf Jung 5 years ago committed by Alexis Beingessner
parent c9db421053
commit 450041032c

@ -21,7 +21,7 @@ language cares about is preventing the following things:
`enum`/`struct`/array/slice/tuple field address `enum`/`struct`/array/slice/tuple field address
* Reading [uninitialized memory][] * Reading [uninitialized memory][]
* Breaking the [pointer aliasing rules][] * Breaking the [pointer aliasing rules][]
* Producing/obtaining invalid primitive values: * Producing invalid primitive values:
* dangling/null/unaligned references * dangling/null/unaligned references
* null `fn` pointers * null `fn` pointers
* a `bool` that isn't 0 or 1 * a `bool` that isn't 0 or 1
@ -33,6 +33,9 @@ language cares about is preventing the following things:
* Unwinding into another language * Unwinding into another language
* Causing a [data race][race] * Causing a [data race][race]
"Producing" a value happens any time a value is assigned, passed to a
function/primitive operation or returned from a function/primitive operation.
That's it. That's all the causes of Undefined Behavior baked into Rust. Of That's it. That's all the causes of Undefined Behavior baked into Rust. Of
course, unsafe functions and traits are free to declare arbitrary other course, unsafe functions and traits are free to declare arbitrary other
constraints that a program must maintain to avoid Undefined Behavior. For constraints that a program must maintain to avoid Undefined Behavior. For

Loading…
Cancel
Save