My code tree.
src :
main.rs modA : mod.rs a.rs
main.rs :
mod modA;
fn main() {
println!("Hello, world!");
}
mod.rs :
pub mod a;
a.rs : dummy function
This code compile.
But I have understood that I should write in mains.rs
use mod modA
instead of
mod modA
; (as it indicated in this link :https://doc.rust-lang.org/reference/items/use-declarations.html) But the compilator has said :unresolved import.
Should I keep the code as he currently is or should I do otherwise?