From 62a73c0afeaa4b5e4ddd9b2cac1c7abf9ca33e9f Mon Sep 17 00:00:00 2001 From: Nick Hamann Date: Thu, 16 Apr 2015 00:47:31 -0500 Subject: [PATCH] Add long diagnostics for E0015 --- src/librustc/diagnostics.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/librustc/diagnostics.rs b/src/librustc/diagnostics.rs index fcad71154aaaf..7c73d6b95fc98 100644 --- a/src/librustc/diagnostics.rs +++ b/src/librustc/diagnostics.rs @@ -112,6 +112,13 @@ reference when using guards or refactor the entire expression, perhaps by putting the condition inside the body of the arm. "##, +E0015: r##" +The only function calls currently allowed in static or constant expressions are +enum variant constructors or struct constructors (for unit or tuple structs). +This is because, at present, Rust does not support compile-time function +execution. +"##, + E0020: r##" This error indicates that an attempt was made to divide by zero (or take the remainder of a zero divisor) in a static or constant expression. @@ -243,7 +250,6 @@ register_diagnostics! { E0012, E0013, E0014, - E0015, E0016, E0017, E0018,