Auto merge of #152717 - zetanumbers:fix-152375, r=JonathanBrouwer,petrochenkov,jieyouxu

Fix wrong par_slice implementation

https://github.com/rust-lang/rust/pull/152375#discussion_r2812669219
This commit is contained in:
bors 2026-02-17 06:20:05 +00:00
commit 1210e9fa3e

View file

@ -133,7 +133,7 @@ fn par_slice<I: DynSend>(
rustc_thread_pool::scope(|s| { rustc_thread_pool::scope(|s| {
let proof = items.derive(()); let proof = items.derive(());
let group_size = std::cmp::max(items.len() / 128, 1); let group_size = std::cmp::max(items.len() / 128, 1);
for group in items.chunks_exact_mut(group_size) { for group in items.chunks_mut(group_size) {
let group = proof.derive(group); let group = proof.derive(group);
s.spawn(|_| { s.spawn(|_| {
let mut group = group; let mut group = group;