Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion src/items/constant-items.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Constant items

> **<sup>Syntax</sup>**
> _ConstantItem_ :
> &nbsp;&nbsp; `const` [IDENTIFIER] `:` [_Type_] `=` [_Expression_] `;`

A *constant item* is a named _[constant value]_ which is not associated with a
specific memory location in the program. Constants are essentially inlined
wherever they are used, meaning that they are copied directly into the relevant
Expand Down Expand Up @@ -37,4 +41,7 @@ const BITS_N_STRINGS: BitsNStrings<'static> = BitsNStrings {

[constant value]: expressions.html#constant-expressions
[static lifetime elision]: items/static-items.html#static-lifetime-elision
[`Drop`]: the-drop-trait.html
[`Drop`]: the-drop-trait.html
[IDENTIFIER]: identifiers.html
[_Type_]: types.html
[_Expression_]: expressions.html