@@ -248,7 +248,7 @@ impl LateLintPass for UnusedAttributes {
248248
249249 let plugin_attributes = cx. sess ( ) . plugin_attributes . borrow_mut ( ) ;
250250 for & ( ref name, ty) in plugin_attributes. iter ( ) {
251- if ty == AttributeType :: Whitelisted && attr. check_name ( & * name) {
251+ if ty == AttributeType :: Whitelisted && attr. check_name ( & name) {
252252 break ;
253253 }
254254 }
@@ -265,7 +265,7 @@ impl LateLintPass for UnusedAttributes {
265265 // the crate level?
266266 let plugin_crate = plugin_attributes. iter ( )
267267 . find ( |& & ( ref x, t) | {
268- & * attr. name ( ) == & * x &&
268+ & * attr. name ( ) == x &&
269269 AttributeType :: CrateLevel == t
270270 } ) . is_some ( ) ;
271271 if known_crate || plugin_crate {
@@ -294,7 +294,7 @@ impl UnusedParens {
294294 fn check_unused_parens_core ( & self , cx : & EarlyContext , value : & ast:: Expr , msg : & str ,
295295 struct_lit_needs_parens : bool ) {
296296 if let ast:: ExprKind :: Paren ( ref inner) = value. node {
297- let necessary = struct_lit_needs_parens && contains_exterior_struct_lit ( & * * inner) ;
297+ let necessary = struct_lit_needs_parens && contains_exterior_struct_lit ( & inner) ;
298298 if !necessary {
299299 cx. span_lint ( UNUSED_PARENS , value. span ,
300300 & format ! ( "unnecessary parentheses around {}" , msg) )
@@ -314,8 +314,8 @@ impl UnusedParens {
314314 ast:: ExprKind :: AssignOp ( _, ref lhs, ref rhs) |
315315 ast:: ExprKind :: Binary ( _, ref lhs, ref rhs) => {
316316 // X { y: 1 } + X { y: 2 }
317- contains_exterior_struct_lit ( & * * lhs) ||
318- contains_exterior_struct_lit ( & * * rhs)
317+ contains_exterior_struct_lit ( & lhs) ||
318+ contains_exterior_struct_lit ( & rhs)
319319 }
320320 ast:: ExprKind :: Unary ( _, ref x) |
321321 ast:: ExprKind :: Cast ( ref x, _) |
@@ -324,12 +324,12 @@ impl UnusedParens {
324324 ast:: ExprKind :: TupField ( ref x, _) |
325325 ast:: ExprKind :: Index ( ref x, _) => {
326326 // &X { y: 1 }, X { y: 1 }.y
327- contains_exterior_struct_lit ( & * * x)
327+ contains_exterior_struct_lit ( & x)
328328 }
329329
330330 ast:: ExprKind :: MethodCall ( _, _, ref exprs) => {
331331 // X { y: 1 }.bar(...)
332- contains_exterior_struct_lit ( & * exprs[ 0 ] )
332+ contains_exterior_struct_lit ( & exprs[ 0 ] )
333333 }
334334
335335 _ => false
@@ -360,7 +360,7 @@ impl EarlyLintPass for UnusedParens {
360360 InPlace ( _, ref value) => ( value, "emplacement value" , false ) ,
361361 _ => return
362362 } ;
363- self . check_unused_parens_core ( cx, & * * value, msg, struct_lit_needs_parens) ;
363+ self . check_unused_parens_core ( cx, & value, msg, struct_lit_needs_parens) ;
364364 }
365365
366366 fn check_stmt ( & mut self , cx : & EarlyContext , s : & ast:: Stmt ) {
@@ -374,7 +374,7 @@ impl EarlyLintPass for UnusedParens {
374374 } ,
375375 _ => return
376376 } ;
377- self . check_unused_parens_core ( cx, & * * value, msg, false ) ;
377+ self . check_unused_parens_core ( cx, & value, msg, false ) ;
378378 }
379379}
380380
0 commit comments