Closed
Description
As part of #2176 I removed directory modules from the language. As a result, crates make heavy use of #[path] to create directory structure.
Right now we have this pattern in some crates:
mod foo {
#[path = "foo/bar.rs"]
mod bar;
}
foo
is a directory and a module containing no external source, but the parser doesn't know that foo is a directory and tries to load bar
from bar.rs
instead of foo/bar.rs
. It probably makes sense to track a stack of module names in the parser and use them to decide the path to external modules. I didn't implement this at the time because it seemed like some odd state for the parser to maintain, but it is probably what people expect.