diff --git a/compiler/rustc_mir/src/transform/promote_consts.rs b/compiler/rustc_mir/src/transform/promote_consts.rs index 0539d8fffab..927aae82a36 100644 --- a/compiler/rustc_mir/src/transform/promote_consts.rs +++ b/compiler/rustc_mir/src/transform/promote_consts.rs @@ -60,10 +60,6 @@ fn run_pass(&self, tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>) { return; } - if !tcx.consider_optimizing(|| format!("PromoteTemps {:?} ", body.source.def_id())) { - return; - } - let mut rpo = traversal::reverse_postorder(body); let ccx = ConstCx::new(tcx, body); let (temps, all_candidates) = collect_temps_and_candidates(&ccx, &mut rpo);