@@ -73,12 +73,12 @@ impl<'a, 'tcx> CFGBuilder<'a, 'tcx> {
7373 fn stmt ( & mut self , stmt : & hir:: Stmt , pred : CFGIndex ) -> CFGIndex {
7474 match stmt. node {
7575 hir:: StmtDecl ( ref decl, id) => {
76- let exit = self . decl ( & * * decl, pred) ;
76+ let exit = self . decl ( & decl, pred) ;
7777 self . add_ast_node ( id, & [ exit] )
7878 }
7979
8080 hir:: StmtExpr ( ref expr, id) | hir:: StmtSemi ( ref expr, id) => {
81- let exit = self . expr ( & * * expr, pred) ;
81+ let exit = self . expr ( & expr, pred) ;
8282 self . add_ast_node ( id, & [ exit] )
8383 }
8484 }
@@ -88,7 +88,7 @@ impl<'a, 'tcx> CFGBuilder<'a, 'tcx> {
8888 match decl. node {
8989 hir:: DeclLocal ( ref local) => {
9090 let init_exit = self . opt_expr ( & local. init , pred) ;
91- self . pat ( & * local. pat , init_exit)
91+ self . pat ( & local. pat , init_exit)
9292 }
9393
9494 hir:: DeclItem ( _) => {
@@ -111,7 +111,7 @@ impl<'a, 'tcx> CFGBuilder<'a, 'tcx> {
111111 hir:: PatBox ( ref subpat) |
112112 hir:: PatRegion ( ref subpat, _) |
113113 hir:: PatIdent ( _, _, Some ( ref subpat) ) => {
114- let subpat_exit = self . pat ( & * * subpat, pred) ;
114+ let subpat_exit = self . pat ( & subpat, pred) ;
115115 self . add_ast_node ( pat. id , & [ subpat_exit] )
116116 }
117117
@@ -140,13 +140,13 @@ impl<'a, 'tcx> CFGBuilder<'a, 'tcx> {
140140 pats : I ,
141141 pred : CFGIndex ) -> CFGIndex {
142142 //! Handles case where all of the patterns must match.
143- pats. fold ( pred, |pred, pat| self . pat ( & * * pat, pred) )
143+ pats. fold ( pred, |pred, pat| self . pat ( & pat, pred) )
144144 }
145145
146146 fn expr ( & mut self , expr : & hir:: Expr , pred : CFGIndex ) -> CFGIndex {
147147 match expr. node {
148148 hir:: ExprBlock ( ref blk) => {
149- let blk_exit = self . block ( & * * blk, pred) ;
149+ let blk_exit = self . block ( & blk, pred) ;
150150 self . add_ast_node ( expr. id , & [ blk_exit] )
151151 }
152152
@@ -165,8 +165,8 @@ impl<'a, 'tcx> CFGBuilder<'a, 'tcx> {
165165 // v 3 v 4
166166 // [..expr..]
167167 //
168- let cond_exit = self . expr ( & * * cond, pred) ; // 1
169- let then_exit = self . block ( & * * then, cond_exit) ; // 2
168+ let cond_exit = self . expr ( & cond, pred) ; // 1
169+ let then_exit = self . block ( & then, cond_exit) ; // 2
170170 self . add_ast_node ( expr. id , & [ cond_exit, then_exit] ) // 3,4
171171 }
172172
@@ -185,9 +185,9 @@ impl<'a, 'tcx> CFGBuilder<'a, 'tcx> {
185185 // v 4 v 5
186186 // [..expr..]
187187 //
188- let cond_exit = self . expr ( & * * cond, pred) ; // 1
189- let then_exit = self . block ( & * * then, cond_exit) ; // 2
190- let else_exit = self . expr ( & * * otherwise, cond_exit) ; // 3
188+ let cond_exit = self . expr ( & cond, pred) ; // 1
189+ let then_exit = self . block ( & then, cond_exit) ; // 2
190+ let else_exit = self . expr ( & otherwise, cond_exit) ; // 3
191191 self . add_ast_node ( expr. id , & [ then_exit, else_exit] ) // 4, 5
192192 }
193193
@@ -211,14 +211,14 @@ impl<'a, 'tcx> CFGBuilder<'a, 'tcx> {
211211
212212 // Is the condition considered part of the loop?
213213 let loopback = self . add_dummy_node ( & [ pred] ) ; // 1
214- let cond_exit = self . expr ( & * * cond, loopback) ; // 2
214+ let cond_exit = self . expr ( & cond, loopback) ; // 2
215215 let expr_exit = self . add_ast_node ( expr. id , & [ cond_exit] ) ; // 3
216216 self . loop_scopes . push ( LoopScope {
217217 loop_id : expr. id ,
218218 continue_index : loopback,
219219 break_index : expr_exit
220220 } ) ;
221- let body_exit = self . block ( & * * body, cond_exit) ; // 4
221+ let body_exit = self . block ( & body, cond_exit) ; // 4
222222 self . add_contained_edge ( body_exit, loopback) ; // 5
223223 self . loop_scopes . pop ( ) ;
224224 expr_exit
@@ -246,7 +246,7 @@ impl<'a, 'tcx> CFGBuilder<'a, 'tcx> {
246246 continue_index : loopback,
247247 break_index : expr_exit,
248248 } ) ;
249- let body_exit = self . block ( & * * body, loopback) ; // 3
249+ let body_exit = self . block ( & body, loopback) ; // 3
250250 self . add_contained_edge ( body_exit, loopback) ; // 4
251251 self . loop_scopes . pop ( ) ;
252252 expr_exit
@@ -271,8 +271,8 @@ impl<'a, 'tcx> CFGBuilder<'a, 'tcx> {
271271 // v 3 v 4
272272 // [..exit..]
273273 //
274- let l_exit = self . expr ( & * * l, pred) ; // 1
275- let r_exit = self . expr ( & * * r, l_exit) ; // 2
274+ let l_exit = self . expr ( & l, pred) ; // 1
275+ let r_exit = self . expr ( & r, l_exit) ; // 2
276276 self . add_ast_node ( expr. id , & [ l_exit, r_exit] ) // 3,4
277277 }
278278
@@ -304,16 +304,16 @@ impl<'a, 'tcx> CFGBuilder<'a, 'tcx> {
304304 }
305305
306306 hir:: ExprCall ( ref func, ref args) => {
307- self . call ( expr, pred, & * * func, args. iter ( ) . map ( |e| & * * e) )
307+ self . call ( expr, pred, & func, args. iter ( ) . map ( |e| & * * e) )
308308 }
309309
310310 hir:: ExprMethodCall ( _, _, ref args) => {
311- self . call ( expr, pred, & * args[ 0 ] , args[ 1 ..] . iter ( ) . map ( |e| & * * e) )
311+ self . call ( expr, pred, & args[ 0 ] , args[ 1 ..] . iter ( ) . map ( |e| & * * e) )
312312 }
313313
314314 hir:: ExprIndex ( ref l, ref r) |
315315 hir:: ExprBinary ( _, ref l, ref r) if self . tcx . is_method_call ( expr. id ) => {
316- self . call ( expr, pred, & * * l, Some ( & * * r) . into_iter ( ) )
316+ self . call ( expr, pred, & l, Some ( & * * r) . into_iter ( ) )
317317 }
318318
319319 hir:: ExprRange ( ref start, ref end) => {
@@ -323,7 +323,7 @@ impl<'a, 'tcx> CFGBuilder<'a, 'tcx> {
323323 }
324324
325325 hir:: ExprUnary ( _, ref e) if self . tcx . is_method_call ( expr. id ) => {
326- self . call ( expr, pred, & * * e, None :: < hir:: Expr > . iter ( ) )
326+ self . call ( expr, pred, & e, None :: < hir:: Expr > . iter ( ) )
327327 }
328328
329329 hir:: ExprTup ( ref exprs) => {
@@ -413,7 +413,7 @@ impl<'a, 'tcx> CFGBuilder<'a, 'tcx> {
413413 opt_expr : & Option < P < hir:: Expr > > ,
414414 pred : CFGIndex ) -> CFGIndex {
415415 //! Constructs graph for `opt_expr` evaluated, if Some
416- opt_expr. iter ( ) . fold ( pred, |p, e| self . expr ( & * * e, p) )
416+ opt_expr. iter ( ) . fold ( pred, |p, e| self . expr ( & e, p) )
417417 }
418418
419419 fn straightline < ' b , I : Iterator < Item =& ' b hir:: Expr > > ( & mut self ,
@@ -461,18 +461,18 @@ impl<'a, 'tcx> CFGBuilder<'a, 'tcx> {
461461
462462 for pat in & arm. pats {
463463 // Visit the pattern, coming from the discriminant exit
464- let mut pat_exit = self . pat ( & * * pat, discr_exit) ;
464+ let mut pat_exit = self . pat ( & pat, discr_exit) ;
465465
466466 // If there is a guard expression, handle it here
467467 if let Some ( ref guard) = arm. guard {
468468 // Add a dummy node for the previous guard
469469 // expression to target
470470 let guard_start = self . add_dummy_node ( & [ pat_exit] ) ;
471471 // Visit the guard expression
472- let guard_exit = self . expr ( & * * guard, guard_start) ;
472+ let guard_exit = self . expr ( & guard, guard_start) ;
473473
474474 let this_has_bindings = pat_util:: pat_contains_bindings_or_wild (
475- & self . tcx . def_map . borrow ( ) , & * * pat) ;
475+ & self . tcx . def_map . borrow ( ) , & pat) ;
476476
477477 // If both this pattern and the previous pattern
478478 // were free of bindings, they must consist only
0 commit comments