diff options
| author | Dylan MacKenzie <ecstaticmorse@gmail.com> | 2019-11-06 14:23:35 -0800 |
|---|---|---|
| committer | Dylan MacKenzie <ecstaticmorse@gmail.com> | 2019-11-08 15:00:20 -0800 |
| commit | b316384e145d4b21b4e882e7abd29fb41d46e33c (patch) | |
| tree | bd1a6e1603f519c2c14ec3dd9e6f2cd7251efeae /src/librustc_mir/transform/mod.rs | |
| parent | 170272b74fdeb1141a23817a4d69b58a084a0cd0 (diff) | |
Use new `PromoteTemps` for promotion
Diffstat (limited to 'src/librustc_mir/transform/mod.rs')
| -rw-r--r-- | src/librustc_mir/transform/mod.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/librustc_mir/transform/mod.rs b/src/librustc_mir/transform/mod.rs index dbe6c784592..6d6d6bea2a0 100644 --- a/src/librustc_mir/transform/mod.rs +++ b/src/librustc_mir/transform/mod.rs @@ -210,13 +210,14 @@ fn mir_validated( } let mut body = tcx.mir_const(def_id).steal(); - let qualify_and_promote_pass = qualify_consts::QualifyAndPromoteConstants::default(); + let promote_pass = promote_consts::PromoteTemps::default(); run_passes(tcx, &mut body, InstanceDef::Item(def_id), None, MirPhase::Validated, &[ // What we need to run borrowck etc. - &qualify_and_promote_pass, + &qualify_consts::QualifyAndPromoteConstants::default(), + &promote_pass, &simplify::SimplifyCfg::new("qualify-consts"), ]); - let promoted = qualify_and_promote_pass.promoted.into_inner(); + let promoted = promote_pass.promoted_fragments.into_inner(); (tcx.alloc_steal_mir(body), tcx.alloc_steal_promoted(promoted)) } |
