From d0dc9323e18f8e1884b571a3968c13d0cf1d5a1e Mon Sep 17 00:00:00 2001 From: jumbatm <30644300+jumbatm@users.noreply.github.com> Date: Tue, 24 Dec 2019 18:29:53 +1000 Subject: [PATCH] Pass new instance instead of self.instance to simd_shuffle_indices. --- src/librustc_codegen_ssa/mir/block.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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,