Why only main.rs can declare mod?
main.rs
main2.rs
file1.rs
src/something.rs
Cargo.toml
on main.rs, doing mod file1 works, but doing mod file1 on main2.rs leads to
file not found for module `file1`
Why only main.rs can declare sibling files with mod?
from Recent Questions - Stack Overflow https://ift.tt/3gXD0iG
https://ift.tt/eA8V8J
Comments
Post a Comment