Skip to content

Commit 8a5238d

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

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/librustc/diagnostics.rs

+7-1
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,13 @@ 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 currently allowed in static or constant expressions are
117+
enum variant constructors or struct constructors (for unit or tuple structs).
118+
This is because, at present, Rust does not support for compile-time function
119+
execution.
120+
"##,
121+
115122
E0020: r##"
116123
This error indicates that an attempt was made to divide by zero (or take the
117124
remainder of a zero divisor) in a static or constant expression.
@@ -243,7 +250,6 @@ register_diagnostics! {
243250
E0012,
244251
E0013,
245252
E0014,
246-
E0015,
247253
E0016,
248254
E0017,
249255
E0018,

0 commit comments

Comments
 (0)