Skip to content

Commit 80404bf

Browse files
authored
Rollup merge of #66047 - ecstatic-morse:issue-66016, r=eddyb
Don't double-count `simd_shuffle` promotion candidates Resolves #66016. The `#[rustc_args_required_const]` attribute was added to `simd_shuffle*` in rust-lang/stdarch#825. This caused `promote_consts` to double-count its second argument when recording promotion candidates, which caused the promotion candidate compatibility check to fail. Once `stdarch` is updated in-tree to include rust-lang/stdarch#825, all special logic around `simd_shuffle` can and should be removed.
2 parents 6ad9f56 + 981e11e commit 80404bf

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/librustc_mir/transform/promote_consts.rs

+2
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,8 @@ impl<'tcx> Visitor<'tcx> for Collector<'_, 'tcx> {
199199
bb: location.block,
200200
index: 2,
201201
});
202+
203+
return; // Don't double count `simd_shuffle` candidates
202204
}
203205
}
204206

0 commit comments

Comments
 (0)