Relative paths and Rust 2018 `use` statements

Agree. But, I don't agree that syntax that can be interpreted as either referring to the sub-module or an external crate, and that has to have a rule that chooses one over the other (with a lint) is "unambiguous syntax".

Unless I've misunderstood something, the current 2018 proposal and the modified proposal would allow a relative path (not a use) to be interpreted as either an external absolute path within a different crate or a local sub-module path. In either case, you arbitrarily have a rule that says how it should be interpreted. I wouldn't consider that unambiguous.

2 Likes

Oh yes, what I mean is specifically having some syntax you can use to be explicit about exactly this point. That's separate from whether you always have to use that syntax.

2 Likes

Revised proposal/thread here!