Make ExprKind::Closure a struct variant.
This commit is contained in:
@@ -405,7 +405,7 @@ impl<'tcx> Visitor<'tcx> for IrMaps<'tcx> {
|
||||
}
|
||||
intravisit::walk_expr(self, expr);
|
||||
}
|
||||
hir::ExprKind::Closure(..) => {
|
||||
hir::ExprKind::Closure { .. } => {
|
||||
// Interesting control flow (for loops can contain labeled
|
||||
// breaks or continues)
|
||||
self.add_live_node_for_node(expr.hir_id, ExprNode(expr.span, expr.hir_id));
|
||||
@@ -833,7 +833,7 @@ impl<'a, 'tcx> Liveness<'a, 'tcx> {
|
||||
|
||||
hir::ExprKind::Field(ref e, _) => self.propagate_through_expr(&e, succ),
|
||||
|
||||
hir::ExprKind::Closure(..) => {
|
||||
hir::ExprKind::Closure { .. } => {
|
||||
debug!("{:?} is an ExprKind::Closure", expr);
|
||||
|
||||
// the construction of a closure itself is not important,
|
||||
@@ -1387,7 +1387,7 @@ fn check_expr<'tcx>(this: &mut Liveness<'_, 'tcx>, expr: &'tcx Expr<'tcx>) {
|
||||
| hir::ExprKind::AddrOf(..)
|
||||
| hir::ExprKind::Struct(..)
|
||||
| hir::ExprKind::Repeat(..)
|
||||
| hir::ExprKind::Closure(..)
|
||||
| hir::ExprKind::Closure { .. }
|
||||
| hir::ExprKind::Path(_)
|
||||
| hir::ExprKind::Yield(..)
|
||||
| hir::ExprKind::Box(..)
|
||||
|
||||
Reference in New Issue
Block a user