Skip to content

Commit d3f3d38

Browse files
committed
Add error explanation for E0010
1 parent da2276e commit d3f3d38

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/librustc/diagnostics.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,11 @@ match x {
168168
```
169169
"##,
170170

171+
E0010: r##"
172+
The value of static and const variables must be known at compile time, and they
173+
live for the entire lifetime of a program. They can not use allocation.
174+
"##,
175+
171176
E0015: r##"
172177
The only function calls allowed in static or constant expressions are enum
173178
variant constructors or struct constructors (for unit or tuple structs). This
@@ -459,7 +464,6 @@ a compile-time constant.
459464
}
460465

461466
register_diagnostics! {
462-
E0010,
463467
E0011,
464468
E0012,
465469
E0013,

0 commit comments

Comments
 (0)