Auto merge of #116170 - matthewjasper:remove-thir-destruction-scopes, r=cjgillot

Don't include destruction scopes in THIR

They are not used by anyone, and add memory/performance overhead.
This commit is contained in:
bors
2023-12-09 12:38:32 +00:00
11 changed files with 235 additions and 468 deletions

View File

@@ -349,10 +349,6 @@ impl ScopeTree {
}
}
pub fn opt_destruction_scope(&self, n: hir::ItemLocalId) -> Option<Scope> {
self.destruction_scopes.get(&n).cloned()
}
pub fn record_var_scope(&mut self, var: hir::ItemLocalId, lifetime: Scope) {
debug!("record_var_scope(sub={:?}, sup={:?})", var, lifetime);
assert!(var != lifetime.item_local_id());