about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/librustc_codegen_ssa/mir/block.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/librustc_codegen_ssa/mir/block.rs b/src/librustc_codegen_ssa/mir/block.rs
index e856be0eeb3..690dd460d03 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,