Open
Description
Wrong Error Code for E0423
- Fixing this issue help this [E0423] expected function, tuple struct or tuple variant, found struct #2432 to emit error code similiar to rustc.
I tried this code from E0423
:
// https://doc.rust-lang.org/error_codes/E0423.html
#![allow(unused)]
fn main() {
pub mod a {
pub const I: i32 = 1;
}
fn h1() -> i32 {
a.I
//~^ ERROR expected value, found module `a`
// did you mean `a::I`?
}
}
I expected to see this happen:
- Give error code similiar to rustc i.e.,
error[E0423]: expected value, found module `a`
Instead, this happened:
- It gives different error code.
E0425
➜ gccrs-build gcc/crab1 ../mahad-testsuite/E0423.rs
../mahad-testsuite/E0423.rs:8:5: error: cannot find value ‘a’ in this scope [E0425]
8 | a.I
| ^
Analyzing compilation unit
Time variable usr sys wall GGC
TOTAL : 0.00 0.00 0.00 146k
Extra diagnostic checks enabled; compiler may run slowly.
Configure with --enable-checking=release to disable checks.
Meta
- What version of Rust GCC were you using, git sha 866512c
- gccrs (Compiler-Explorer-Build-gcc-a06cec181de6398231e0662c1ed83d905ad6d1d9-binutils-2.40) 13.0.1 20230417 (experimental)