File tree 2 files changed +12
-15
lines changed
rustc_codegen_cranelift/src/driver
rustc_data_structures/src/sync
2 files changed +12
-15
lines changed Original file line number Diff line number Diff line change @@ -732,21 +732,14 @@ pub(crate) fn run_aot(
732
732
tcx. sess . time ( "codegen mono items" , || {
733
733
let modules: Vec < _ > = par_map ( todo_cgus, |( _, cgu) | {
734
734
let dep_node = cgu. codegen_dep_node ( tcx) ;
735
- IntoDynSyncSend (
736
- tcx. dep_graph
737
- . with_task (
738
- dep_node,
739
- tcx,
740
- (
741
- global_asm_config. clone ( ) ,
742
- cgu. name ( ) ,
743
- concurrency_limiter. acquire ( tcx. dcx ( ) ) ,
744
- ) ,
745
- module_codegen,
746
- Some ( rustc_middle:: dep_graph:: hash_result) ,
747
- )
748
- . 0 ,
749
- )
735
+ let ( module, _) = tcx. dep_graph . with_task (
736
+ dep_node,
737
+ tcx,
738
+ ( global_asm_config. clone ( ) , cgu. name ( ) , concurrency_limiter. acquire ( tcx. dcx ( ) ) ) ,
739
+ module_codegen,
740
+ Some ( rustc_middle:: dep_graph:: hash_result) ,
741
+ ) ;
742
+ IntoDynSyncSend ( module)
750
743
} ) ;
751
744
modules
752
745
. into_iter ( )
Original file line number Diff line number Diff line change @@ -175,6 +175,10 @@ pub fn par_for_each_in<I: DynSend, T: IntoIterator<Item = I>>(
175
175
} ) ;
176
176
}
177
177
178
+ /// This runs `for_each` in parallel for each iterator item. If one or more of the
179
+ /// `for_each` calls returns `Err`, the function will also return `Err`. The error returned
180
+ /// will be non-deterministic, but this is expected to be used with `ErrorGuaranteed` which
181
+ /// are all equivalent.
178
182
pub fn try_par_for_each_in < T : IntoIterator , E : DynSend > (
179
183
t : T ,
180
184
for_each : impl Fn ( & <T as IntoIterator >:: Item ) -> Result < ( ) , E > + DynSync + DynSend ,
You can’t perform that action at this time.
0 commit comments