Skip to content

Commit d0dc932

Browse files
committed
Pass new instance instead of self.instance to simd_shuffle_indices.
1 parent 697a38b commit d0dc932

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/librustc_codegen_ssa/mir/block.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -618,14 +618,14 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
618618
if let mir::PlaceRef {
619619
base:
620620
&PlaceBase::Static(box Static {
621-
kind: StaticKind::Promoted(promoted, _),
621+
kind: StaticKind::Promoted(promoted, substs),
622622
ty,
623-
def_id: _,
623+
def_id,
624624
}),
625625
projection: &[],
626626
} = place.as_ref()
627627
{
628-
let c = bx.tcx().const_eval_promoted(self.instance, promoted);
628+
let c = bx.tcx().const_eval_promoted(Instance::new(def_id, self.monomorphize(&substs)), promoted);
629629
let (llval, ty) = self.simd_shuffle_indices(
630630
&bx,
631631
terminator.source_info.span,

0 commit comments

Comments
 (0)