]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_data_structures/sync.rs
Auto merge of #69833 - Centril:rollup-mh74yue, r=Centril
[rust.git] / src / librustc_data_structures / sync.rs
index fa98b4d72dda2b16663f0bd03af8a5a18b2d9ec4..9051b1751b119426d2a6101dfe6ee867492834b1 100644 (file)
@@ -203,11 +203,7 @@ pub fn par_iter<T: IntoIterator>(t: T) -> T::IntoIter {
             t.into_iter()
         }
 
-        pub fn par_for_each_in<T: IntoIterator>(
-            t: T,
-            for_each:
-                impl Fn(<<T as IntoIterator>::IntoIter as Iterator>::Item) + Sync + Send
-        ) {
+        pub fn par_for_each_in<T: IntoIterator>(t: T, for_each: impl Fn(T::Item) + Sync + Send) {
             // We catch panics here ensuring that all the loop iterations execute.
             // This makes behavior consistent with the parallel compiler.
             let mut panic = None;
@@ -397,9 +393,7 @@ pub fn par_iter<T: IntoParallelIterator>(t: T) -> T::Iter {
 
         pub fn par_for_each_in<T: IntoParallelIterator>(
             t: T,
-            for_each: impl Fn(
-                <<T as IntoParallelIterator>::Iter as ParallelIterator>::Item
-            ) + Sync + Send
+            for_each: impl Fn(T::Item) + Sync + Send,
         ) {
             t.into_par_iter().for_each(for_each)
         }