Rename CleanupNonCodegenStatements to CleanupPostBorrowck
This commit is contained in:
parent
2a8513d221
commit
4c3efc7f1b
@ -22,9 +22,9 @@ use crate::MirPass;
|
||||
use rustc_middle::mir::{Body, BorrowKind, Rvalue, StatementKind};
|
||||
use rustc_middle::ty::TyCtxt;
|
||||
|
||||
pub struct CleanupNonCodegenStatements;
|
||||
pub struct CleanupPostBorrowck;
|
||||
|
||||
impl<'tcx> MirPass<'tcx> for CleanupNonCodegenStatements {
|
||||
impl<'tcx> MirPass<'tcx> for CleanupPostBorrowck {
|
||||
fn run_pass(&self, _tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>) {
|
||||
for basic_block in body.basic_blocks.as_mut_preserves_cfg() {
|
||||
for statement in basic_block.statements.iter_mut() {
|
||||
|
@ -497,7 +497,7 @@ fn run_analysis_cleanup_passes<'tcx>(tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>) {
|
||||
&remove_false_edges::RemoveFalseEdges,
|
||||
&simplify_branches::SimplifyConstCondition::new("initial"),
|
||||
&remove_noop_landing_pads::RemoveNoopLandingPads,
|
||||
&cleanup_post_borrowck::CleanupNonCodegenStatements,
|
||||
&cleanup_post_borrowck::CleanupPostBorrowck,
|
||||
&simplify::SimplifyCfg::new("early-opt"),
|
||||
&deref_separator::Derefer,
|
||||
];
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
// ignore-wasm32-bare compiled with panic=abort by default
|
||||
|
||||
// EMIT_MIR remove_fake_borrows.match_guard.CleanupNonCodegenStatements.diff
|
||||
// EMIT_MIR remove_fake_borrows.match_guard.CleanupPostBorrowck.diff
|
||||
fn match_guard(x: Option<&&i32>, c: bool) -> i32 {
|
||||
match x {
|
||||
Some(0) if c => 0,
|
||||
|
Loading…
x
Reference in New Issue
Block a user