about summary refs log tree commit diff
diff options
context:
space:
mode:
authorNiko Matsakis <niko@alum.mit.edu>2017-11-08 05:15:04 -0500
committerNiko Matsakis <niko@alum.mit.edu>2017-11-18 07:47:35 -0500
commiteab5b263e8a6189868caf7bd135e3ce127b57424 (patch)
treeeda7ad5d7f56ca662a86c7b8adc2650efbb9b54f
parent130eaaeabae0af23e0cbbb16e2ba9d6c13092e0f (diff)
downloadrust-eab5b263e8a6189868caf7bd135e3ce127b57424.tar.gz
rust-eab5b263e8a6189868caf7bd135e3ce127b57424.zip
flatten the arguments to `analyze_closure`
They were oddly tupled.
-rw-r--r--src/librustc_typeck/check/upvar.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/librustc_typeck/check/upvar.rs b/src/librustc_typeck/check/upvar.rs
index 9a70a8699aa..2835c6c4916 100644
--- a/src/librustc_typeck/check/upvar.rs
+++ b/src/librustc_typeck/check/upvar.rs
@@ -79,7 +79,8 @@ impl<'a, 'gcx, 'tcx> Visitor<'gcx> for InferBorrowKindVisitor<'a, 'gcx, 'tcx> {
             hir::ExprClosure(cc, _, body_id, _, is_generator) => {
                 let body = self.fcx.tcx.hir.body(body_id);
                 self.visit_body(body);
-                self.fcx.analyze_closure((expr.id, expr.hir_id),
+                self.fcx.analyze_closure(expr.id,
+                                         expr.hir_id,
                                          expr.span,
                                          body,
                                          cc,
@@ -95,7 +96,8 @@ impl<'a, 'gcx, 'tcx> Visitor<'gcx> for InferBorrowKindVisitor<'a, 'gcx, 'tcx> {
 
 impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> {
     fn analyze_closure(&self,
-                       (closure_node_id, closure_hir_id): (ast::NodeId, hir::HirId),
+                       closure_node_id: ast::NodeId,
+                       closure_hir_id: hir::HirId,
                        span: Span,
                        body: &hir::Body,
                        capture_clause: hir::CaptureClause,