Commit d9885c4
authored
Rollup merge of rust-lang#57343 - Xanewok:querify-access-levels, r=nikomatsakis
Calculate privacy access only via query
Initially converted to query in rust-lang@a9f6bab and then changed to respect dependencies rust-lang@8281e88.
I did this as an effort to prune `CrateAnalysis` from librustc_save_analysis, with the only thing remaining being the glob map (`name` is unused, existing `crate_name` is exposed in the compiler passes, instead).
Since calculating the glob map is opt-in, it'd be great if we could calculate that on-demand. However, it seems that it'd require converting resolution to queries, which I'm not sure how to do yet.
In an effort to get rid of `CrateAnalysis` altogether, could we try unconditionally calculating the glob_map in the resolver, thus completely removing `CrateAnalysis` struct, and doing a perf run?
r? @nikomatsakis
cc @petrochenkov do you have any idea how/if at all could we querify the resolver? I've stumbled upon a comment that's ~3? years old at the moment, so I'm guessing things might have changed and it actually may be feasible now. https://github.com/rust-lang/rust/blob/fe0c10019d7ee96909cc42cc265ef999a6b5dd70/src/librustc_driver/driver.rs#L589-L593File tree
4 files changed
+10
-17
lines changed- src
- librustc_driver
- librustc_save_analysis
- librustc/ty
- librustdoc
4 files changed
+10
-17
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
18 | 17 | | |
19 | 18 | | |
20 | 19 | | |
| |||
123 | 122 | | |
124 | 123 | | |
125 | 124 | | |
126 | | - | |
127 | | - | |
128 | 125 | | |
129 | 126 | | |
130 | 127 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
8 | 7 | | |
9 | 8 | | |
10 | 9 | | |
| |||
18 | 17 | | |
19 | 18 | | |
20 | 19 | | |
21 | | - | |
| 20 | + | |
22 | 21 | | |
23 | 22 | | |
24 | 23 | | |
| |||
785 | 784 | | |
786 | 785 | | |
787 | 786 | | |
788 | | - | |
789 | | - | |
790 | 787 | | |
791 | 788 | | |
792 | 789 | | |
| |||
1193 | 1190 | | |
1194 | 1191 | | |
1195 | 1192 | | |
1196 | | - | |
| 1193 | + | |
1197 | 1194 | | |
1198 | 1195 | | |
1199 | 1196 | | |
| |||
1275 | 1272 | | |
1276 | 1273 | | |
1277 | 1274 | | |
1278 | | - | |
1279 | | - | |
| 1275 | + | |
| 1276 | + | |
| 1277 | + | |
1280 | 1278 | | |
1281 | 1279 | | |
1282 | 1280 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
59 | | - | |
| 59 | + | |
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
66 | | - | |
| 66 | + | |
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
476 | 476 | | |
477 | 477 | | |
478 | 478 | | |
479 | | - | |
480 | | - | |
481 | 479 | | |
482 | 480 | | |
483 | 481 | | |
| |||
500 | 498 | | |
501 | 499 | | |
502 | 500 | | |
503 | | - | |
| 501 | + | |
504 | 502 | | |
505 | 503 | | |
506 | 504 | | |
507 | 505 | | |
508 | | - | |
| 506 | + | |
509 | 507 | | |
510 | 508 | | |
511 | 509 | | |
| |||
0 commit comments