Yes, I actually use explicit #[path]s in my code to rename <module>/mod.rs to <module>/<module>.rs, for example https://github.com/briansmith/ring/blob/4410207a4ec399241209a69e979bcd3ceb93ee1d/src/lib.rs#L140-L144. Unfortunately, a recent version of Rust broke this so I had to add this to the top of lib.rs:
#![allow(legacy_directory_ownership)]
I’m not sure what the solution is.
I’m thinking about reorganizing my code to use dotted filenames for each module, all in a single directory level.
Before, three directories for three files, three files named mod.rs:
submodule1/sub-submodule-1/mod.rs
submodule1/sub-submodule-2/mod.rs
submodule2/mod.rs
After, three files in one directory, every file has a unique name:
submodule1.sub-submodule-1.rs
submodule1.sub-submodule-2.rs
submodule2.rs
I believe this can be done with #[path] already as well.