We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 578fd2e commit d390ce2Copy full SHA for d390ce2
1 file changed
src/behavior-considered-undefined.md
@@ -60,6 +60,10 @@ code.
60
> `rustc_layout_scalar_valid_range_*` attributes.
61
* Incorrect use of inline assembly. For more details, refer to the [rules] to
62
follow when writing code that uses inline assembly.
63
+* **In `const` context** (i.e., during the evaluation of a `const`/`static`
64
+ initializer, array length, enum discriminant, or const generic value):
65
+ transmuting or otherwise reinterpreting a pointer into some allocated object
66
+ as an integer.
67
68
**Note:** Uninitialized memory is also implicitly invalid for any type that has
69
a restricted set of valid values. In other words, the only cases in which
0 commit comments