Skip to content

Commit 03d38d4

Browse files
committed
Address review comments
1 parent de7c836 commit 03d38d4

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

src/librustc_middle/mir/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ pub enum MirPhase {
101101
/// After this phase, generators are explicit state machines (no more `Yield`).
102102
/// `AggregateKind::Generator` is gone for good.
103103
GeneratorLowering = 4,
104-
Optimized = 5,
104+
Optimization = 5,
105105
}
106106

107107
impl MirPhase {

src/librustc_mir/interpret/intern.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,7 @@ impl<'mir, 'tcx: 'mir, M: super::intern::CompileTimeMachine<'mir, 'tcx>> InterpC
436436
/// A helper function that allocates memory for the layout given and gives you access to mutate
437437
/// it. Once your own mutation code is done, the backing `Allocation` is removed from the
438438
/// current `Memory` and returned.
439-
pub(crate) fn with_temp_alloc(
439+
pub(crate) fn intern_with_temp_alloc(
440440
&mut self,
441441
layout: TyAndLayout<'tcx>,
442442
f: impl FnOnce(

src/librustc_mir/transform/const_prop.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -845,7 +845,7 @@ impl<'mir, 'tcx> ConstPropagator<'mir, 'tcx> {
845845
if ty_is_scalar(ty1) && ty_is_scalar(ty2) {
846846
let alloc = this
847847
.ecx
848-
.with_temp_alloc(value.layout, |ecx, dest| {
848+
.intern_with_temp_alloc(value.layout, |ecx, dest| {
849849
ecx.write_immediate_to_mplace(*imm, dest)
850850
})
851851
.unwrap();

src/librustc_mir/transform/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ pub fn run_passes(
228228

229229
body.phase = mir_phase;
230230

231-
if mir_phase == MirPhase::Optimized {
231+
if mir_phase == MirPhase::Optimization {
232232
validate::Validator { when: format!("end of phase {:?}", mir_phase), mir_phase }
233233
.run_pass(tcx, source, body);
234234
}
@@ -504,7 +504,7 @@ fn run_optimization_passes<'tcx>(
504504
body,
505505
InstanceDef::Item(ty::WithOptConstParam::unknown(def_id.to_def_id())),
506506
promoted,
507-
MirPhase::Optimized,
507+
MirPhase::Optimization,
508508
&[
509509
if mir_opt_level > 0 { optimizations } else { no_optimizations },
510510
pre_codegen_cleanup,

0 commit comments

Comments
 (0)