// test.rs
pub mod foo;
use foo::bar::f;
fn main() {
f()
}
// foo/mod.rs
pub mod bar;
pub fn f() {}
we fail to name resolve modules and compile the code, whereas rustc does not show any errors.
arthur@platypus ~/G/r/gccrs (master)> build/gcc/crab1 test.rs
test.rs:1:5: error: no candidate found for module foo
1 | pub mod foo;
| ^~~
Analyzing compilation unit
Time variable usr sys wall GGC
TOTAL : 0.00 0.00 0.00 150k
Extra diagnostic checks enabled; compiler may run slowly.
Configure with --enable-checking=release to disable checks.
With the following directory structure
and the following files:
we fail to name resolve modules and compile the code, whereas
rustc
does not show any errors.with name resolution 2.0: