about summary refs log tree commit diff
path: root/src/tools/rust-analyzer
blob: b73b321478d3b2a98d380eb79de717e01620c4e9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
tree a9e4ab2b7f1271c2119a7028c6d893895870a0f0
parent 847d0faf92707f84fa32560313e91f7ad8d40b94
parent dbb702cfc1419850e7d208a1b375e4a69dbe8e87
author bors[bot] <26634292+bors[bot]@users.noreply.github.com> 1630870637 +0000
committer GitHub <noreply@github.com> 1630870637 +0000
gpgsig -----BEGIN PGP SIGNATURE-----
 
 wsBcBAABCAAQBQJhNRxtCRBK7hj4Ov3rIwAAxB4IAHMBjEzL3hEcjgwthf8F1eSB
 bAeN8Spi40VlgKWxQPyfOCGRIERTyO6IURb2E/EwKvPEacqMmcLYpeji+3oWKlhF
 jEXd1cMNSE74pEkDbIAm6+6WOzFtuFboT7zCLNFPR2RJLP/+Bi73N1iAejJBTvjo
 KfiTKjXf2qMSceE3UAWO9MPV1jFt31Lz8b+Ty7DpKarRmPVUZq7V0BuApAsGfQ6O
 Bi5cO7rGjUBrN8X4hgAqON/y/dWYg2ji/22xwEn3FWiL/VDFoeYGIynbVVyepthZ
 9bddbWVyAlRWanr19tcM6OA2iSTYFe8Xvshzfi1zZcc7cKQjN1dGjX7W/xUmgg8=
 =M8Tf
 -----END PGP SIGNATURE-----
 

Merge #10161

10161: Don't dump `DefMap`s to build the panic context r=matklad a=matklad

internal: remove accidental code re-use
FragmentKind played two roles:

* entry point to the parser
* syntactic category of a macro call

These are different use-cases, and warrant different types. For example,
macro can't expand to visibility, but we have such fragment today.

This PR introduces `ExpandsTo` enum to separate this two use-cases.

I suspect we might further split `FragmentKind` into `$x:specifier` enum
specific to MBE, and a general parser entry point, but that's for
another PR!

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>