Don't include destruction scopes in THIR

They are not used by anyone, and add memory/performance overhead.
This commit is contained in:
Matthew Jasper
2023-12-04 16:31:13 +00:00
parent 0a83e43f28
commit 43adf41ca6
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());