Skip to content

Commit 5f20141

Browse files
Add long explanation for E0018
1 parent 49a94f2 commit 5f20141

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 @@ variant constructors or struct constructors (for unit or tuple structs). This
168168
is because Rust currently does not support compile-time function execution.
169169
"##,
170170

171+
E0018: r##"
172+
The value of static and const variables must be known at compile time, which is
173+
not possible with a pointer or with a value pointed by a pointer.
174+
"##,
175+
171176
E0020: r##"
172177
This error indicates that an attempt was made to divide by zero (or take the
173178
remainder of a zero divisor) in a static or constant expression.
@@ -398,7 +403,6 @@ register_diagnostics! {
398403
E0014,
399404
E0016,
400405
E0017,
401-
E0018,
402406
E0019,
403407
E0022,
404408
E0079, // enum variant: expected signed integer constant

0 commit comments

Comments
 (0)