-
Notifications
You must be signed in to change notification settings - Fork 13.7k
Closed
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsE-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.Call for participation: An issue has been fixed and does not reproduce, but no test has been added.
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
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsE-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.Call for participation: An issue has been fixed and does not reproduce, but no test has been added.