rust/crates/hir-def
bors cecbed98d8 Auto merge of #15360 - lowr:fix/mbe-transcribe-path-of-different-types, r=HKalbasi
Fixup path fragments upon MBE transcription

Fixes #14367

There are roughly two types of paths: paths in expression context, where a separator `::` between an identifier and its following generic argument list is mandatory, and paths in type context, where `::` can be omitted.

Unlike rustc, we need to transform the parsed fragments back into tokens during transcription. When the matched path fragment is a type-context path and is transcribed as an expression-context path, verbatim transcription would cause a syntax error.

This PR fixes up path fragments by inserting `::` to make sure they are syntactically correct in all contexts. Note that this works because expression-context paths are a strict superset of type-context paths.
2023-07-30 17:29:36 +00:00
..
src Auto merge of #15360 - lowr:fix/mbe-transcribe-path-of-different-types, r=HKalbasi 2023-07-30 17:29:36 +00:00
Cargo.toml Upgrade to indexmap v2 2023-06-24 17:35:20 -07:00