@@ -70,9 +70,9 @@ impl LintPass for AssignOps {
70
70
71
71
impl < ' a , ' tcx > LateLintPass < ' a , ' tcx > for AssignOps {
72
72
fn check_expr ( & mut self , cx : & LateContext < ' a , ' tcx > , expr : & ' tcx hir:: Expr ) {
73
- match expr. node {
74
- hir:: ExprKind :: AssignOp ( op, ref lhs, ref rhs) => {
75
- if let hir:: ExprKind :: Binary ( binop, ref l, ref r) = rhs. node {
73
+ match & expr. node {
74
+ hir:: ExprKind :: AssignOp ( op, lhs, rhs) => {
75
+ if let hir:: ExprKind :: Binary ( binop, l, r) = & rhs. node {
76
76
if op. node == binop. node {
77
77
let lint = |assignee : & hir:: Expr , rhs_other : & hir:: Expr | {
78
78
span_lint_and_then (
@@ -122,8 +122,8 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for AssignOps {
122
122
}
123
123
}
124
124
} ,
125
- hir:: ExprKind :: Assign ( ref assignee, ref e) => {
126
- if let hir:: ExprKind :: Binary ( op, ref l, ref r) = e. node {
125
+ hir:: ExprKind :: Assign ( assignee, e) => {
126
+ if let hir:: ExprKind :: Binary ( op, l, r) = & e. node {
127
127
#[ allow( clippy:: cyclomatic_complexity) ]
128
128
let lint = |assignee : & hir:: Expr , rhs : & hir:: Expr | {
129
129
let ty = cx. tables . expr_ty ( assignee) ;
@@ -150,8 +150,8 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for AssignOps {
150
150
if_chain! {
151
151
if parent_impl != ast:: CRATE_NODE_ID ;
152
152
if let hir:: Node :: Item ( item) = cx. tcx. hir( ) . get( parent_impl) ;
153
- if let hir:: ItemKind :: Impl ( _, _, _, _, Some ( ref trait_ref) , _, _) =
154
- item. node;
153
+ if let hir:: ItemKind :: Impl ( _, _, _, _, Some ( trait_ref) , _, _) =
154
+ & item. node;
155
155
if trait_ref. path. def. def_id( ) == trait_id;
156
156
then { return ; }
157
157
}
0 commit comments