Closed
Description
In the following code:
fn main() {
let foo = 42u32;
const FOO : u32 = foo;
}
We have the following errors:
<anon>:3:23: 3:26 error: attempt to use a non-constant value in a constant [E0435]
<anon>:3 const FOO : u32 = foo;
^~~
<anon>:3:23: 3:26 error: unresolved name `foo` [E0425]
<anon>:3 const FOO : u32 = foo;
The first one is "normal", however, the E0425 might mislead developer's understanding on this error.
cc @eddyb