Macro path uses novel syntax

I think this can be “fixed” in the same way as https://github.com/rust-lang/rust/issues/41740.

I.e. instead of three “styles” of paths described by @kennytm, there will be two styles of paths - “usual” paths with optional :: before <...> usable everywhere except for expressions, and “sorry but we need a disambiguator” paths with mandatory :: before <...> used in expressions.
Generic arguments in import/visibility/etc paths will be rejected by a semantic check and not by parser (this is already necessary, see https://github.com/rust-lang/rust/blob/master/src/test/compile-fail/import-ty-params.rs).

This way you will be able to pass any kinds of paths to macros and choose the variant that looks better / more natural, e.g. Vec::<i32>::new for methods (even if Vec<i32>::new will still be accepted).

1 Like