Skip to content

Commit 8b01b71

Browse files
committed
Add restriction of the final value of a const wrt mutable
1 parent 73de72e commit 8b01b71

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/items/constant-items.md

+2
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ const BITS_N_STRINGS: BitsNStrings<'static> = BitsNStrings {
3939
};
4040
```
4141

42+
The final value of a `const` item cannot contain references to anything mutable.
43+
4244
The constant expression may only be omitted in a [trait definition].
4345

4446
## Constants with Destructors

0 commit comments

Comments
 (0)