Skip to content

Commit b624855

Browse files
committed
Unwrap lines in validity.const-provenance
1 parent 3742d0a commit b624855

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/behavior-considered-undefined.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -215,11 +215,7 @@ r[undefined.validity.valid-range]
215215
> `rustc` achieves this with the unstable `rustc_layout_scalar_valid_range_*` attributes.
216216
217217
r[undefined.validity.const-provenance]
218-
* **In [const context](const_eval.md#const-context)**: In addition to what is described above,
219-
further provenance-related requirements apply during const evaluation.
220-
Any value that holds pure integer data (the `i*`/`u*`/`f*` types as well as `bool` and `char`, enum discriminants, and slice metadata) must not carry any provenance.
221-
Any value that holds pointer data (references, raw pointers, function pointers, and `dyn Trait` metadata) must either carry no provenance,
222-
or all bytes must be fragments of the same original pointer value in the correct order.
218+
* **In [const context](const_eval.md#const-context)**: In addition to what is described above, further provenance-related requirements apply during const evaluation. Any value that holds pure integer data (the `i*`/`u*`/`f*` types as well as `bool` and `char`, enum discriminants, and slice metadata) must not carry any provenance. Any value that holds pointer data (references, raw pointers, function pointers, and `dyn Trait` metadata) must either carry no provenance, or all bytes must be fragments of the same original pointer value in the correct order.
223219

224220
This implies that transmuting or otherwise reinterpreting a pointer (reference, raw pointer, or function pointer) into a non-pointer type (such as integers) is undefined behavior if the pointer had provenance.
225221

0 commit comments

Comments
 (0)