Commit a5410c9
committed
Revise text on initializer provenance restriction
The text here is describing a restriction on the final value of a
constant or static initializer. We could put this in the chapters for
constant and static items, but then we'd have to duplicate it. At the
same time, it doesn't make sense to be in the section for constant
expressions since this is not a restriction on those expressions.
Let's solve this, for now, by keeping it in the chapter on constant
evaluation but putting it in a new "constant initializers" section.
We'll move the second paragraph, which states what a compiler should
do as a "quality-of-implementation" matter, into an admonition, and
we'll reword this a bit to talk about what `rustc` does (but does not
guarantee) to match the style we use for this in other places.
We also add links to the appropriate chapters and sections for
constant and static initializers.1 parent e77ce18 commit a5410c9
1 file changed
+7
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
232 | 232 | | |
233 | 233 | | |
234 | 234 | | |
| 235 | + | |
| 236 | + | |
235 | 237 | | |
236 | | - | |
| 238 | + | |
237 | 239 | | |
238 | | - | |
239 | | - | |
| 240 | + | |
| 241 | + | |
240 | 242 | | |
241 | 243 | | |
242 | 244 | | |
| |||
313 | 315 | | |
314 | 316 | | |
315 | 317 | | |
| 318 | + | |
316 | 319 | | |
317 | 320 | | |
318 | 321 | | |
| |||
342 | 345 | | |
343 | 346 | | |
344 | 347 | | |
| 348 | + | |
345 | 349 | | |
346 | 350 | | |
347 | 351 | | |
| |||
0 commit comments