From 7610feb82a386d1637c60a05d6c64b6c4c459bb6 Mon Sep 17 00:00:00 2001 From: "Felix S. Klock II" Date: Sat, 7 Feb 2015 13:16:09 +0100 Subject: [PATCH] remove closure `&mut:`/`&:` annotations. --- src/librustc/middle/infer/region_inference/graphviz.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/librustc/middle/infer/region_inference/graphviz.rs b/src/librustc/middle/infer/region_inference/graphviz.rs index 88db1000acc..362919755c3 100644 --- a/src/librustc/middle/infer/region_inference/graphviz.rs +++ b/src/librustc/middle/infer/region_inference/graphviz.rs @@ -154,7 +154,7 @@ impl<'a, 'tcx> ConstraintGraph<'a, 'tcx> { add_node(n2); } - tcx.region_maps.each_encl_scope(|&mut: sub, sup| { + tcx.region_maps.each_encl_scope(|sub, sup| { add_node(Node::Region(ty::ReScope(*sub))); add_node(Node::Region(ty::ReScope(*sup))); }); @@ -176,7 +176,7 @@ impl<'a, 'tcx> dot::Labeller<'a, Node, Edge> for ConstraintGraph<'a, 'tcx> { Some(node_id) => node_id, None => panic!("no node_id found for node: {:?}", n), }; - let name = |&:| format!("node_{}", node_id); + let name = || format!("node_{}", node_id); match dot::Id::new(name()) { Ok(id) => id, Err(_) => { @@ -234,7 +234,7 @@ impl<'a, 'tcx> dot::GraphWalk<'a, Node, Edge> for ConstraintGraph<'a, 'tcx> { fn edges(&self) -> dot::Edges { debug!("constraint graph has {} edges", self.map.len()); let mut v : Vec<_> = self.map.keys().map(|e| Edge::Constraint(*e)).collect(); - self.tcx.region_maps.each_encl_scope(|&mut: sub, sup| { + self.tcx.region_maps.each_encl_scope(|sub, sup| { v.push(Edge::EnclScope(*sub, *sup)) }); debug!("region graph has {} edges", v.len());