Closed
Description
Consider this layout
// main.rs
mod foo;
fn main() {}
// foo.rs
mod bar;
// bar.rs
// empty
It generates cannot declare a new module at this location
error for mod bar;
, which is good.
However, If I explicitly specify #[path = ]
for mod foo;
it compiles:
// main.rs
#[path = "foo.rs"]
mod foo;
fn main() {}
// foo.rs
mod bar;
// bar.rs
// empty
I don't know if this is expected behavior or not, but it looks suspicious to me .