@@ -119,7 +119,7 @@ mod break_keyword {}
119
119
120
120
#[ doc( keyword = "const" ) ]
121
121
//
122
- /// Compile-time constants, compile-time evaluable functions, and raw pointers.
122
+ /// Compile-time constants, compile-time blocks, compile-time evaluable functions, and raw pointers.
123
123
///
124
124
/// ## Compile-time constants
125
125
///
@@ -166,6 +166,12 @@ mod break_keyword {}
166
166
///
167
167
/// For more detail on `const`, see the [Rust Book] or the [Reference].
168
168
///
169
+ /// ## Compile-time blocks
170
+ ///
171
+ /// The `const` keyword can also be used to define a block of code that is evaluated at compile time.
172
+ /// This is useful for ensuring certain computations are completed before optimizations happen, as well as
173
+ /// before runtime. For more details, see the [Reference][const-blocks].
174
+ ///
169
175
/// ## Compile-time evaluable functions
170
176
///
171
177
/// The other main use of the `const` keyword is in `const fn`. This marks a function as being
@@ -184,6 +190,7 @@ mod break_keyword {}
184
190
/// [pointer primitive]: pointer
185
191
/// [Rust Book]: ../book/ch03-01-variables-and-mutability.html#constants
186
192
/// [Reference]: ../reference/items/constant-items.html
193
+ /// [const-blocks]: ../reference/expressions/block-expr.html#const-blocks
187
194
/// [const-eval]: ../reference/const_eval.html
188
195
mod const_keyword { }
189
196
0 commit comments