diff options
| author | Camille GILLOT <gillot.camille@gmail.com> | 2022-06-11 21:25:25 +0200 |
|---|---|---|
| committer | Camille GILLOT <gillot.camille@gmail.com> | 2022-06-12 00:16:27 +0200 |
| commit | 3039cfeb6a24c65ab4b7d25f1c60dc0a5df836ac (patch) | |
| tree | 66c3a317d49d7fb64829d951b6d38f4b8ffff2ec /compiler/rustc_passes/src/upvars.rs | |
| parent | fa68e73e9947be8ffc5b3b46d899e4953a44e7e9 (diff) | |
| download | rust-3039cfeb6a24c65ab4b7d25f1c60dc0a5df836ac.tar.gz rust-3039cfeb6a24c65ab4b7d25f1c60dc0a5df836ac.zip | |
Make `ExprKind::Closure` a struct variant.
Diffstat (limited to 'compiler/rustc_passes/src/upvars.rs')
| -rw-r--r-- | compiler/rustc_passes/src/upvars.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_passes/src/upvars.rs b/compiler/rustc_passes/src/upvars.rs index 25fe8e45825..97a461272b4 100644 --- a/compiler/rustc_passes/src/upvars.rs +++ b/compiler/rustc_passes/src/upvars.rs @@ -75,7 +75,7 @@ impl<'tcx> Visitor<'tcx> for CaptureCollector<'_, 'tcx> { } fn visit_expr(&mut self, expr: &'tcx hir::Expr<'tcx>) { - if let hir::ExprKind::Closure(..) = expr.kind { + if let hir::ExprKind::Closure { .. } = expr.kind { let closure_def_id = self.tcx.hir().local_def_id(expr.hir_id); if let Some(upvars) = self.tcx.upvars_mentioned(closure_def_id) { // Every capture of a closure expression is a local in scope, |
