1
Fork 0

refactor constant evaluation error reporting

Refactor constant evaluation to use a single error reporting function
that reports a type-error-like message.

Also, unify all error codes with the "constant evaluation error" message
to just E0080, and similarly for a few other duplicate codes. The old
situation was a total mess, and now that we have *something* we can
further iterate on the UX.
This commit is contained in:
Ariel Ben-Yehuda 2016-07-20 00:02:56 +03:00
parent fa4eda8935
commit 37c569627c
55 changed files with 506 additions and 376 deletions

View file

@ -14,7 +14,7 @@ trait Foo {
const ID: usize;
}
const X: [i32; <i32 as Foo>::ID] = [0, 1, 2]; //~ ERROR E0250
const X: [i32; <i32 as Foo>::ID] = [0, 1, 2]; //~ ERROR E0080
fn main() {
assert_eq!(1, X);