3 ms·
Note that rust-analyzer could choose to load un-`mod`-ed files with no change to the language. At a minimum, this could be an off-by-default configuration. Ide
by Rusky 6y ago
Note that rust-analyzer could choose to load un-`mod`-ed files with no change to the language.
At a minimum, this could be an off-by-default configuration. Ideally, it would suppress errors caused by these extra files, and downgrade errors caused by missing `mod` declarations to warnings, with a quick-fix to add the declaration.
> They can just stash the file as well.
This is an option, but it's not clear-cut whether it's a better one. See my other comment: https://news.ycombinator.com/item?id=23890842 https://news.ycombinator.com/item?id=23890842
> This strikes me as making the whole system harder for new people to understand just to smooth over edge cases for power users that definitely have the ability to come up with workarounds.
This certainly was not the goal. The goal of the 2018 module system changes in general was to make the module system easier to learn than it was before; this aspect was simply retained as-is because we couldn't figure out how to make it better without making existing aspects worse.