diff options
| author | bors <bors@rust-lang.org> | 2023-07-30 17:29:36 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-07-30 17:29:36 +0000 |
| commit | cecbed98d82ab187a5d94fd616c1653b4ce91673 (patch) | |
| tree | b5557e05c89135d6bbdeb704b94c86f742844557 /compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp | |
| parent | 712b53865f4130de5e7bb56aeedb9b03a3032745 (diff) | |
| parent | fd7435d46363d22143d4ced3bb20c27c6b85e901 (diff) | |
| download | rust-cecbed98d82ab187a5d94fd616c1653b4ce91673.tar.gz rust-cecbed98d82ab187a5d94fd616c1653b4ce91673.zip | |
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.
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
