about summary refs log tree commit diff
path: root/compiler/rustc_mir_transform/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2025-04-14 16:45:11 +0000
committerbors <bors@rust-lang.org>2025-04-14 16:45:11 +0000
commit990039ec53d5bffe0ec77391e00f0e5be05924e8 (patch)
tree019b3318c00d67290c0178b47edc60fcba59af4b /compiler/rustc_mir_transform/src
parent07d3fd1d9b9c1f07475b96a9d168564bf528db68 (diff)
parent47e5b18f33550ee3db479748650e93291fdec6eb (diff)
downloadrust-990039ec53d5bffe0ec77391e00f0e5be05924e8.tar.gz
rust-990039ec53d5bffe0ec77391e00f0e5be05924e8.zip
Auto merge of #139814 - matthiaskrgr:rollup-lxkkcz6, r=matthiaskrgr
Rollup of 8 pull requests

Successful merges:

 - #139127 (Fix up partial res of segment in primitive resolution hack)
 - #139392 (Detect and provide suggestion for `&raw EXPR`)
 - #139767 (Visit place in `BackwardIncompatibleDropHint` statement)
 - #139777 (Remove `define_debug_via_print` for `ExistentialProjection`, use regular structural debug impl)
 - #139796 (ptr docs: add missing backtics around 'usize')
 - #139801 (Add myself to mailmap)
 - #139804 (use `realpath` in `bootstrap.py` when creating build-dir)
 - #139807 (Improve wording of post-merge report)

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_mir_transform/src')
-rw-r--r--compiler/rustc_mir_transform/src/cleanup_post_borrowck.rs3
-rw-r--r--compiler/rustc_mir_transform/src/simplify.rs14
2 files changed, 2 insertions, 15 deletions
diff --git a/compiler/rustc_mir_transform/src/cleanup_post_borrowck.rs b/compiler/rustc_mir_transform/src/cleanup_post_borrowck.rs
index cb844019857..4be67b873f7 100644
--- a/compiler/rustc_mir_transform/src/cleanup_post_borrowck.rs
+++ b/compiler/rustc_mir_transform/src/cleanup_post_borrowck.rs
@@ -35,7 +35,8 @@ impl<'tcx> crate::MirPass<'tcx> for CleanupPostBorrowck {
                         // MIR building, and are not needed after InstrumentCoverage.
                         CoverageKind::BlockMarker { .. } | CoverageKind::SpanMarker { .. },
                     )
-                    | StatementKind::FakeRead(..) => statement.make_nop(),
+                    | StatementKind::FakeRead(..)
+                    | StatementKind::BackwardIncompatibleDropHint { .. } => statement.make_nop(),
                     StatementKind::Assign(box (
                         _,
                         Rvalue::Cast(
diff --git a/compiler/rustc_mir_transform/src/simplify.rs b/compiler/rustc_mir_transform/src/simplify.rs
index 84905f4a400..5947637cded 100644
--- a/compiler/rustc_mir_transform/src/simplify.rs
+++ b/compiler/rustc_mir_transform/src/simplify.rs
@@ -597,20 +597,6 @@ impl<'tcx> MutVisitor<'tcx> for LocalUpdater<'tcx> {
         self.tcx
     }
 
-    fn visit_statement(&mut self, statement: &mut Statement<'tcx>, location: Location) {
-        if let StatementKind::BackwardIncompatibleDropHint { place, reason: _ } =
-            &mut statement.kind
-        {
-            self.visit_local(
-                &mut place.local,
-                PlaceContext::MutatingUse(MutatingUseContext::Store),
-                location,
-            );
-        } else {
-            self.super_statement(statement, location);
-        }
-    }
-
     fn visit_local(&mut self, l: &mut Local, _: PlaceContext, _: Location) {
         *l = self.map[*l].unwrap();
     }