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

Popular posts from this blog

I get wrong characters when retreiving the message body of an email using TIdIMAP4.UIDRetrieveTextPeek2()

How to drop the all the 1's in a correlation matrix

Today Walkin 14th-Sept