]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_typeck/src/check/upvar.rs
Rollup merge of #98916 - ChrisDenton:hiberfil.sys, r=thomcc
[rust.git] / compiler / rustc_typeck / src / check / upvar.rs
index 824ddb10a37b38d2a5d6388568bc82d7ce9b4ce6..3bd3e2d80917d2bc16d46147b706a88122f3ebba 100644 (file)
@@ -142,7 +142,7 @@ struct InferBorrowKindVisitor<'a, 'tcx> {
 impl<'a, 'tcx> Visitor<'tcx> for InferBorrowKindVisitor<'a, 'tcx> {
     fn visit_expr(&mut self, expr: &'tcx hir::Expr<'tcx>) {
         match expr.kind {
-            hir::ExprKind::Closure { capture_clause, body: body_id, .. } => {
+            hir::ExprKind::Closure(&hir::Closure { capture_clause, body: body_id, .. }) => {
                 let body = self.fcx.tcx.hir().body(body_id);
                 self.visit_body(body);
                 self.fcx.analyze_closure(expr.hir_id, expr.span, body_id, body, capture_clause);