diff --git a/src/librustc_codegen_ssa/mir/block.rs b/src/librustc_codegen_ssa/mir/block.rs index e856be0eeb3f..690dd460d032 100644 --- a/src/librustc_codegen_ssa/mir/block.rs +++ b/src/librustc_codegen_ssa/mir/block.rs @@ -618,14 +618,14 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> { if let mir::PlaceRef { base: &PlaceBase::Static(box Static { - kind: StaticKind::Promoted(promoted, _), + kind: StaticKind::Promoted(promoted, substs), ty, - def_id: _, + def_id, }), projection: &[], } = place.as_ref() { - let c = bx.tcx().const_eval_promoted(self.instance, promoted); + let c = bx.tcx().const_eval_promoted(Instance::new(def_id, self.monomorphize(&substs)), promoted); let (llval, ty) = self.simd_shuffle_indices( &bx, terminator.source_info.span,