Teach the parser to associate the mod hierarchy in a file with directories #4117
Labels
E-easy
Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
Milestone
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:
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 loadbar
frombar.rs
instead offoo/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.The text was updated successfully, but these errors were encountered: