Skip to content

Commit 4c3efc7

Browse files
committed
Rename CleanupNonCodegenStatements to CleanupPostBorrowck
1 parent 2a8513d commit 4c3efc7

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

compiler/rustc_mir_transform/src/cleanup_post_borrowck.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ use crate::MirPass;
2222
use rustc_middle::mir::{Body, BorrowKind, Rvalue, StatementKind};
2323
use rustc_middle::ty::TyCtxt;
2424

25-
pub struct CleanupNonCodegenStatements;
25+
pub struct CleanupPostBorrowck;
2626

27-
impl<'tcx> MirPass<'tcx> for CleanupNonCodegenStatements {
27+
impl<'tcx> MirPass<'tcx> for CleanupPostBorrowck {
2828
fn run_pass(&self, _tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>) {
2929
for basic_block in body.basic_blocks.as_mut_preserves_cfg() {
3030
for statement in basic_block.statements.iter_mut() {

compiler/rustc_mir_transform/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -497,7 +497,7 @@ fn run_analysis_cleanup_passes<'tcx>(tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>) {
497497
&remove_false_edges::RemoveFalseEdges,
498498
&simplify_branches::SimplifyConstCondition::new("initial"),
499499
&remove_noop_landing_pads::RemoveNoopLandingPads,
500-
&cleanup_post_borrowck::CleanupNonCodegenStatements,
500+
&cleanup_post_borrowck::CleanupPostBorrowck,
501501
&simplify::SimplifyCfg::new("early-opt"),
502502
&deref_separator::Derefer,
503503
];

src/test/mir-opt/remove_fake_borrows.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
// ignore-wasm32-bare compiled with panic=abort by default
44

5-
// EMIT_MIR remove_fake_borrows.match_guard.CleanupNonCodegenStatements.diff
5+
// EMIT_MIR remove_fake_borrows.match_guard.CleanupPostBorrowck.diff
66
fn match_guard(x: Option<&&i32>, c: bool) -> i32 {
77
match x {
88
Some(0) if c => 0,

0 commit comments

Comments
 (0)