1
Fork 0

Add an indirection for closures in hir::ExprKind

This helps bring `hir::Expr` size down, `Closure` was the biggest
variant, especially after `for<>` additions.
This commit is contained in:
Maybe Waffle 2022-07-11 23:39:53 +04:00
parent 3ebb852956
commit df4fee9841
26 changed files with 101 additions and 79 deletions

View file

@ -1360,7 +1360,7 @@ impl<'tcx> Visitor<'tcx> for DumpVisitor<'tcx> {
}
}
}
hir::ExprKind::Closure { ref fn_decl, body, .. } => {
hir::ExprKind::Closure(&hir::Closure { ref fn_decl, body, .. }) => {
let id = format!("${}", ex.hir_id);
// walk arg and return types