Partially support "overloaded deref" MIR lowering

This commit is contained in:
hkalbasi 2023-03-04 23:38:04 +03:30
parent bf0f99f15d
commit af90ec8096
14 changed files with 546 additions and 297 deletions

View file

@ -422,13 +422,6 @@ impl Body {
}
}
pub fn walk_child_bindings(&self, pat: PatId, f: &mut impl FnMut(BindingId)) {
if let Pat::Bind { id, .. } = self[pat] {
f(id)
}
self[pat].walk_child_pats(|p| self.walk_child_bindings(p, f));
}
pub fn pretty_print(&self, db: &dyn DefDatabase, owner: DefWithBodyId) -> String {
pretty::print_body_hir(db, self, owner)
}