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:
parent
fa4eda8935
commit
37c569627c
55 changed files with 506 additions and 376 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue