File tree 1 file changed +5
-2
lines changed
1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -1094,8 +1094,7 @@ fn cargo_to_crate_graph(
1094
1094
) -> ( CrateGraph , ProcMacroPaths ) {
1095
1095
let _p = tracing:: info_span!( "cargo_to_crate_graph" ) . entered ( ) ;
1096
1096
let mut res = ( CrateGraph :: default ( ) , ProcMacroPaths :: default ( ) ) ;
1097
- let crate_graph = & mut res. 0 ;
1098
- let proc_macros = & mut res. 1 ;
1097
+ let ( crate_graph, proc_macros) = & mut res;
1099
1098
let ( public_deps, libproc_macro) =
1100
1099
sysroot_to_crate_graph ( crate_graph, sysroot, rustc_cfg. clone ( ) , load) ;
1101
1100
@@ -1560,6 +1559,10 @@ fn extend_crate_graph_with_sysroot(
1560
1559
1561
1560
// Remove all crates except the ones we are interested in to keep the sysroot graph small.
1562
1561
let removed_mapping = sysroot_crate_graph. remove_crates_except ( & marker_set) ;
1562
+ sysroot_proc_macros = sysroot_proc_macros
1563
+ . into_iter ( )
1564
+ . filter_map ( |( k, v) | Some ( ( removed_mapping[ k. into_raw ( ) . into_u32 ( ) as usize ] ?, v) ) )
1565
+ . collect ( ) ;
1563
1566
let mapping = crate_graph. extend ( sysroot_crate_graph, & mut sysroot_proc_macros) ;
1564
1567
1565
1568
// Map the id through the removal mapping first, then through the crate graph extension mapping.
You can’t perform that action at this time.
0 commit comments