|
let c = bx.tcx().const_eval_promoted(self.instance, promoted); |
It should use Instance::new(def_is, self.monomorphize(substs). (substs is the second field of StaticKind::Promoted.) While both instances are normally equal, they can differ after running the mir inliner. In that case the promoted will refer to the inlined function.
@rustbot modify labels: +A-mir +C-bug +requires-nightly
This issue has been assigned to @jumbatm via this comment.
rust/src/librustc_codegen_ssa/mir/block.rs
Line 628 in a916ac2
It should use
Instance::new(def_is, self.monomorphize(substs). (substsis the second field ofStaticKind::Promoted.) While both instances are normally equal, they can differ after running the mir inliner. In that case the promoted will refer to the inlined function.@rustbot modify labels: +A-mir +C-bug +requires-nightly
This issue has been assigned to @jumbatm via this comment.