Skip to content

Commit f043695

Browse files
author
Nick Hamann
committed
Add long diagnostics for E0015
1 parent da636c7 commit f043695

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
@@ -112,6 +112,12 @@ reference when using guards or refactor the entire expression, perhaps by
112112
putting the condition inside the body of the arm.
113113
"##,
114114

115+
E0015: r##"
116+
The only function calls allowed in static or constant expressions are enum
117+
variant constructors or struct constructors (for unit or tuple structs). This
118+
is because Rust currently does not support compile-time function execution.
119+
"##,
120+
115121
E0020: r##"
116122
This error indicates that an attempt was made to divide by zero (or take the
117123
remainder of a zero divisor) in a static or constant expression.
@@ -243,7 +249,6 @@ register_diagnostics! {
243249
E0012,
244250
E0013,
245251
E0014,
246-
E0015,
247252
E0016,
248253
E0017,
249254
E0018,

0 commit comments

Comments
 (0)