We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 220938f + 6abb465 commit 93d7690Copy full SHA for 93d7690
const.md
@@ -6,6 +6,7 @@ On top of what applies to [statics](static.md), they are subject to an additiona
6
const CONST: T = EXPR;
7
```
8
is supposed to behave as-if `EXPR` was written at every use site of `CONST`.
9
+However, in current versions of rustc, `EXPR` is just computed once and the result is bit-wise copied each time `CONST` is used.
10
To make this work, we need to ensure [const safety](const_safety.md).
11
12
Based on this requirement, we allow other constants and [promoteds](promotion.md) to read from constants.
0 commit comments