about summary refs log tree commit diff
path: root/compiler/rustc_mir_dataflow/src/impls
diff options
context:
space:
mode:
authordianqk <dianqk@dianqk.net>2025-07-19 18:49:47 +0800
committerdianqk <dianqk@dianqk.net>2025-10-02 14:58:59 +0800
commit8da04285cf6fe61587e16155a8b224dba64bf0be (patch)
tree4d4c98956c6bd938cd5ffe9bbfb7928a2f229a12 /compiler/rustc_mir_dataflow/src/impls
parent1bd89bd42e0bb6f29b8af5d6bdf3f756196bb8ee (diff)
downloadrust-8da04285cf6fe61587e16155a8b224dba64bf0be.tar.gz
rust-8da04285cf6fe61587e16155a8b224dba64bf0be.zip
mir-opt: Eliminate dead statements even if they are used by debuginfos
Diffstat (limited to 'compiler/rustc_mir_dataflow/src/impls')
-rw-r--r--compiler/rustc_mir_dataflow/src/impls/liveness.rs3
1 files changed, 0 insertions, 3 deletions
diff --git a/compiler/rustc_mir_dataflow/src/impls/liveness.rs b/compiler/rustc_mir_dataflow/src/impls/liveness.rs
index 037e2720f36..f6aaa65ad9f 100644
--- a/compiler/rustc_mir_dataflow/src/impls/liveness.rs
+++ b/compiler/rustc_mir_dataflow/src/impls/liveness.rs
@@ -287,9 +287,6 @@ impl<'a, 'tcx> Analysis<'tcx> for MaybeTransitiveLiveLocals<'a> {
         if let Some(destination) =
             Self::can_be_removed_if_dead(&statement.kind, &self.always_live, &self.debuginfo_locals)
             && !state.contains(destination.local)
-            // FIXME: We can eliminate the statement, but we'll need the statements it depends on
-            // for debuginfos. We need a way to handle this.
-            && !self.debuginfo_locals.contains(destination.local)
         {
             // This store is dead
             return;