IMO the existing solution is simpler: treat crate in a path like any other crate name, so you always write ::crate::foo in the cases where it would be ambiguous (plus several other cases).
Yes, I actually think framing this as a bunch of warnings that could later be turned into errors is a great way to demonstrate why I like leading-crate so much. Your description works just as well for the flag-day approach, if it’s applied only to the current epoch.
One aspect that I’d like to pick out, because I don’t think it’s been discussed, is the idea of allowing implicit extern crate in the current epoch via a flag rather than via a fallback mechanism. This might be seen as opening the floodgates to lots of feature-specific flags outside of epochs, but it does simplify both the implementation and the porting work, so it might be justified in this case.
That is, because the alternatives here introduce so much churn, and the fallback is so complex, it might be worth using this approach instead of “flag day” or “fallback”:
- Stabilize leading-crate paths in the current epoch.
- Warn on paths that do not begin with
::crate/::some_dep; add suggestions along the lines proposed by @jmst both for these warnings and for path-not-found errors.
- Offer a feature flag, still in the current epoch, to make
extern crate optional. Force this flag on in the next epoch.