Skip to content

Commit 8d795ef

Browse files
author
Nick Hamann
committed
Add long diagnostics for E0015
1 parent 7d2fd23 commit 8d795ef

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.
@@ -319,7 +325,6 @@ register_diagnostics! {
319325
E0012,
320326
E0013,
321327
E0014,
322-
E0015,
323328
E0016,
324329
E0017,
325330
E0018,

0 commit comments

Comments
 (0)