about summary refs log tree commit diff
diff options
context:
space:
mode:
authorklensy <klensy@users.noreply.github.com>2024-01-26 19:45:00 +0300
committerklensy <klensy@users.noreply.github.com>2024-01-26 19:45:00 +0300
commit90254cd55fcdc3fc7101300398b6e715d99b9c3e (patch)
tree5d190241be3059830e534c763d1668e5855eee69
parent69db514ed9238bb11f5d2c576fe26020e3b99a52 (diff)
downloadrust-90254cd55fcdc3fc7101300398b6e715d99b9c3e.tar.gz
rust-90254cd55fcdc3fc7101300398b6e715d99b9c3e.zip
ScopeTree: remove destruction_scopes as unused
last usages removed by https://github.com/rust-lang/rust/pull/116170
-rw-r--r--compiler/rustc_middle/src/middle/region.rs8
1 files changed, 0 insertions, 8 deletions
diff --git a/compiler/rustc_middle/src/middle/region.rs b/compiler/rustc_middle/src/middle/region.rs
index 5d6a7f75df8..b9914f6cb7a 100644
--- a/compiler/rustc_middle/src/middle/region.rs
+++ b/compiler/rustc_middle/src/middle/region.rs
@@ -221,9 +221,6 @@ pub struct ScopeTree {
     /// variable is declared.
     var_map: FxIndexMap<hir::ItemLocalId, Scope>,
 
-    /// Maps from a `NodeId` to the associated destruction scope (if any).
-    destruction_scopes: FxIndexMap<hir::ItemLocalId, Scope>,
-
     /// Identifies expressions which, if captured into a temporary, ought to
     /// have a temporary whose lifetime extends to the end of the enclosing *block*,
     /// and not the enclosing *statement*. Expressions that are not present in this
@@ -336,11 +333,6 @@ impl ScopeTree {
             let prev = self.parent_map.insert(child, p);
             assert!(prev.is_none());
         }
-
-        // Record the destruction scopes for later so we can query them.
-        if let ScopeData::Destruction = child.data {
-            self.destruction_scopes.insert(child.item_local_id(), child);
-        }
     }
 
     pub fn record_var_scope(&mut self, var: hir::ItemLocalId, lifetime: Scope) {