4 ms·
> I couldn't bother to decipher how paths and `extern crate` had changed. I don't know if you're looking for this, or if it will help, but here's the way I thi
by Rusky 7y ago
> I couldn't bother to decipher how paths and `extern crate` had changed.
I don't know if you're looking for this, or if it will help, but here's the way I think of it:
In 2015, `use` paths are relative to the root module of the crate, and `extern crate` adds dependencies as items there.
In 2018, `use` paths are relative to one level above the root module of the crate, or "the root listing of all crates".
That's it- if you think of them like file paths, the edition basically just did `mv /your_crate/{all extern crates} /`, or alternatively `mv /{all your items} /crate/`.