about summary refs log tree commit diff
path: root/compiler/rustc_mir_transform/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-08-17 22:22:06 +0000
committerbors <bors@rust-lang.org>2023-08-17 22:22:06 +0000
commitccc3ac0cae0d901a360c4f93f6d41d87ed459d20 (patch)
tree42a3a95147402bdde70c57b19aca621134480319 /compiler/rustc_mir_transform/src
parent07688726805d5db0a4bca445a6651d09708041ea (diff)
parent3798bca60546712afdc673eb73783c784442b340 (diff)
downloadrust-ccc3ac0cae0d901a360c4f93f6d41d87ed459d20.tar.gz
rust-ccc3ac0cae0d901a360c4f93f6d41d87ed459d20.zip
Auto merge of #114904 - cjgillot:no-ref-debuginfo, r=wesleywiser
Remove references in VarDebugInfo

The codegen implementation is broken, and attempted to read uninitialized memory.

Fixes https://github.com/rust-lang/rust/issues/114488
Diffstat (limited to 'compiler/rustc_mir_transform/src')
-rw-r--r--compiler/rustc_mir_transform/src/ref_prop.rs8
1 files changed, 0 insertions, 8 deletions
diff --git a/compiler/rustc_mir_transform/src/ref_prop.rs b/compiler/rustc_mir_transform/src/ref_prop.rs
index c17c791f9c3..49a940b5779 100644
--- a/compiler/rustc_mir_transform/src/ref_prop.rs
+++ b/compiler/rustc_mir_transform/src/ref_prop.rs
@@ -265,7 +265,6 @@ fn compute_replacement<'tcx>(
         targets,
         storage_to_remove,
         allowed_replacements,
-        fully_replacable_locals,
         any_replacement: false,
     };
 
@@ -346,7 +345,6 @@ struct Replacer<'tcx> {
     storage_to_remove: BitSet<Local>,
     allowed_replacements: FxHashSet<(Local, Location)>,
     any_replacement: bool,
-    fully_replacable_locals: BitSet<Local>,
 }
 
 impl<'tcx> MutVisitor<'tcx> for Replacer<'tcx> {
@@ -366,12 +364,6 @@ impl<'tcx> MutVisitor<'tcx> for Replacer<'tcx> {
             if let Some((&PlaceElem::Deref, rest)) = target.projection.split_last() {
                 *place = Place::from(target.local).project_deeper(rest, self.tcx);
                 self.any_replacement = true;
-            } else if self.fully_replacable_locals.contains(place.local)
-                && let Some(references) = debuginfo.references.checked_add(1)
-            {
-                debuginfo.references = references;
-                *place = target;
-                self.any_replacement = true;
             } else {
                 break
             }