I bet @traveller was mistakenly using mod foo;
instead of use foo;
.
error[E0583]: file not found for module `foo`
--> src/main.rs:1:5
|
1 | mod foo;
| ^^^
|
= help: name the file either foo.rs or foo/mod.rs inside the directory "src"
Perhaps another help:
line would be in order?
help: to import the sibling module named `foo`, try `use crate::foo;`