Commit c06b2b9
committed
Auto merge of rust-lang#113847 - SparrowLii:path_clone, r=cjgillot
avoid clone path prefix when lowering to hir
Found this while trying to parallelize `lower_to_hir`.
When lowering to hir, `Nested` paths in `ast` will be split and the prefix segments will be cloned. This could be omited, since the only consequence is that the prefix segments in `Path`s in hir will have the same `HirId`s, and it seems harmless.
This simplifies the process of lowering to hir and avoids re-modification of `ResolverAstLowering`.
r? `@Aaron1011`
cc rust-lang#992922 files changed
+3
-21
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
551 | 551 | | |
552 | 552 | | |
553 | 553 | | |
554 | | - | |
555 | | - | |
556 | | - | |
557 | | - | |
558 | | - | |
559 | | - | |
560 | | - | |
561 | | - | |
562 | | - | |
563 | | - | |
564 | | - | |
565 | 554 | | |
566 | 555 | | |
567 | 556 | | |
| |||
570 | 559 | | |
571 | 560 | | |
572 | 561 | | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
573 | 565 | | |
574 | 566 | | |
575 | 567 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
148 | 148 | | |
149 | 149 | | |
150 | 150 | | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | 151 | | |
156 | 152 | | |
157 | 153 | | |
| |||
184 | 180 | | |
185 | 181 | | |
186 | 182 | | |
187 | | - | |
188 | | - | |
189 | | - | |
190 | | - | |
191 | | - | |
192 | | - | |
193 | 183 | | |
194 | 184 | | |
195 | 185 | | |
| |||
0 commit comments