Skip to content

Commit c6618c0

Browse files
authored
Rollup merge of rust-lang#120386 - klensy:destruction_scopes, r=compiler-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)
2 parents f402b8b + 90254cd commit c6618c0

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

compiler/rustc_middle/src/middle/region.rs

-8
Original file line numberDiff line numberDiff line change
@@ -221,9 +221,6 @@ pub struct ScopeTree {
221221
/// variable is declared.
222222
var_map: FxIndexMap<hir::ItemLocalId, Scope>,
223223

224-
/// Maps from a `NodeId` to the associated destruction scope (if any).
225-
destruction_scopes: FxIndexMap<hir::ItemLocalId, Scope>,
226-
227224
/// Identifies expressions which, if captured into a temporary, ought to
228225
/// have a temporary whose lifetime extends to the end of the enclosing *block*,
229226
/// and not the enclosing *statement*. Expressions that are not present in this
@@ -336,11 +333,6 @@ impl ScopeTree {
336333
let prev = self.parent_map.insert(child, p);
337334
assert!(prev.is_none());
338335
}
339-
340-
// Record the destruction scopes for later so we can query them.
341-
if let ScopeData::Destruction = child.data {
342-
self.destruction_scopes.insert(child.item_local_id(), child);
343-
}
344336
}
345337

346338
pub fn record_var_scope(&mut self, var: hir::ItemLocalId, lifetime: Scope) {

0 commit comments

Comments
 (0)