Skip to content

Commit

Permalink
Add long diagnostics for E0015
Browse files Browse the repository at this point in the history
  • Loading branch information
Nick Hamann committed Apr 16, 2015
1 parent da636c7 commit 62a73c0
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/librustc/diagnostics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -243,7 +250,6 @@ register_diagnostics! {
E0012,
E0013,
E0014,
E0015,
E0016,
E0017,
E0018,
Expand Down

0 comments on commit 62a73c0

Please sign in to comment.