Skip to content

Commit f9ecc6e

Browse files
committed
Auto merge of rust-lang#24892 - robinst:issue-24407-E0010, r=pnkfelix
Part of rust-lang#24407.
2 parents 42bfeec + 95ad630 commit f9ecc6e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/librustc/diagnostics.rs

+6-1
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,12 @@ match x {
168168
```
169169
"##,
170170

171+
E0010: r##"
172+
The value of statics and constants must be known at compile time, and they live
173+
for the entire lifetime of a program. Creating a boxed value allocates memory on
174+
the heap at runtime, and therefore cannot be done at compile time.
175+
"##,
176+
171177
E0013: r##"
172178
Static and const variables can refer to other const variables. But a const
173179
variable cannot refer to a static variable. For example, `Y` cannot refer to `X`
@@ -494,7 +500,6 @@ a compile-time constant.
494500
}
495501

496502
register_diagnostics! {
497-
E0010,
498503
E0011,
499504
E0012,
500505
E0014,

0 commit comments

Comments
 (0)