Commit 69ccd5a
committed
rdr: fix SpanRef resolution and optimize metadata encoding
- Fix decoder to use span_file_data source map for -Zstable-crate-hash crates
- Add preload_all_source_files for deterministic BytePos ordering
- Enable -Zstable-crate-hash for library builds and copy .spans to sysroot
- Encode fn_arg_idents with SpanRef
- Add transform_span_ref_for_export to convert local stable_ids to exported
stable_ids when encoding predicate queries to metadata
Refactor span conversion into SpanConversionState and add lazy_array_with
and lazy_array_with_mut helpers that scope borrows per-item. This avoids
intermediate Vec allocations and HashMap cloning when encoding arrays
that need span transformation, while avoiding borrow conflicts with
encode(&mut self).1 parent 770d5fe commit 69ccd5a
File tree
8 files changed
+288
-209
lines changed- compiler
- rustc_hir_analysis/src/collect
- rustc_metadata/src
- rmeta
- rustc_middle/src/ty
- src/bootstrap/src/core/build_steps
- tests/run-make/rdr-hygiene-hash-collision
8 files changed
+288
-209
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
12 | 11 | | |
13 | 12 | | |
14 | 13 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
47 | | - | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
48 | 49 | | |
49 | 50 | | |
50 | 51 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
658 | 658 | | |
659 | 659 | | |
660 | 660 | | |
| 661 | + | |
| 662 | + | |
661 | 663 | | |
662 | 664 | | |
663 | 665 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2126 | 2126 | | |
2127 | 2127 | | |
2128 | 2128 | | |
2129 | | - | |
2130 | | - | |
| 2129 | + | |
| 2130 | + | |
| 2131 | + | |
| 2132 | + | |
| 2133 | + | |
2131 | 2134 | | |
2132 | 2135 | | |
2133 | 2136 | | |
| |||
2266 | 2269 | | |
2267 | 2270 | | |
2268 | 2271 | | |
| 2272 | + | |
| 2273 | + | |
| 2274 | + | |
| 2275 | + | |
| 2276 | + | |
| 2277 | + | |
| 2278 | + | |
| 2279 | + | |
| 2280 | + | |
| 2281 | + | |
| 2282 | + | |
| 2283 | + | |
| 2284 | + | |
| 2285 | + | |
| 2286 | + | |
| 2287 | + | |
| 2288 | + | |
| 2289 | + | |
| 2290 | + | |
2269 | 2291 | | |
2270 | 2292 | | |
2271 | 2293 | | |
| |||
0 commit comments