Skip to content

Commit 52cc85f

Browse files
committed
Address nits and remove unneeded pass
1 parent 94414ac commit 52cc85f

File tree

3 files changed

+4
-8
lines changed

3 files changed

+4
-8
lines changed

src/librustc_mir/transform/inline.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -496,7 +496,7 @@ impl Inliner<'tcx> {
496496
kind: TerminatorKind::Goto { target: BasicBlock::new(bb_len) }
497497
};
498498

499-
caller_body[callsite.bb].terminator= Some(terminator);
499+
caller_body[callsite.bb].terminator = Some(terminator);
500500

501501
true
502502
}

src/librustc_mir/transform/mod.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -297,8 +297,6 @@ fn run_optimization_passes<'tcx>(
297297
&uniform_array_move_out::RestoreSubsliceArrayMoveOut::new(tcx),
298298
&inline::Inline,
299299

300-
// State transform requires that predecessors have been predefined
301-
&ensure_predecessors_cache::EnsurePredecessorsCache::new("pre-state-transform"),
302300
// Lowering generator control-flow and variables
303301
// has to happen before we do anything else to them.
304302
&generator::StateTransform,

src/librustc_mir/transform/simplify.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -124,11 +124,9 @@ impl<'a, 'tcx> CfgSimplifier<'a, 'tcx> {
124124
changed |= inner_changed;
125125
}
126126

127-
{
128-
let data = &mut self.basic_blocks[bb];
129-
data.statements.extend(new_stmts);
130-
data.terminator = Some(terminator);
131-
}
127+
let data = &mut self.basic_blocks[bb];
128+
data.statements.extend(new_stmts);
129+
data.terminator = Some(terminator);
132130

133131
changed |= inner_changed;
134132
}

0 commit comments

Comments
 (0)