The Great Module Adventure Continues

@nikomatsakis
I plan to work on this next.
After https://github.com/rust-lang/rust/pull/48917 lands I need to do some strategic refactoring in import resolution, because the current implementation of use my_crate as name; is a hack and contains bugs preventing, for example, putting use crate as std; into libstd prelude.
After that I’ll try to implement the fallback.

The “put everything from --extern cmdline option into the prelude” part is almost trivial and can be implemented independently at any time, but I’m not sure it’s a good idea in general and it’s also a pure extension, so I’d rather implement it as one more option under a separate feature gate for now. (I can write mentoring instructions for this part.)

3 Likes

Interesting note: you can get something similar the way this is going today with use ::*; if people want to try out a very-suboptimal version of the always-in-scope extern crates. Do note that it also brings in your root modules as well, as you would expect.

@Dylan-DPC This comment is the current proposal: The Great Module Adventure Continues

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.