Closed
Description
Rust wont let me do (all in one src/)
main.rs:
mod image;
image.rs:
mod string; <<<< 'error: cannot declare a new module at this location'
string.rs:
whatever
I don't see anything in crates-and-modules.md that says it's not possible and/or why.
It does let me add the mod string; in the top level main.rs.
(as a new rust user it doesn't make much sense to me why you can't, since main/rs doesn't use string.rs, but image.rs, so why does main.rs care)
Metadata
Metadata
Assignees
Labels
No labels