Skip to content

Commit

Permalink
Rollup merge of rust-lang#120386 - klensy:destruction_scopes, r=compi…
Browse files Browse the repository at this point in the history
…ler-errors

ScopeTree: remove destruction_scopes as unused

last usages removed by rust-lang#116170

Unused, but still presented in memory at `t-gmax` (in DHAT termonology)
  • Loading branch information
Nadrieril authored Jan 27, 2024
2 parents f402b8b + 90254cd commit c6618c0
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions compiler/rustc_middle/src/middle/region.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit c6618c0

Please sign in to comment.