@@ -110,11 +110,11 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for EqOp {
110110 OP_REF ,
111111 e. span ,
112112 "needlessly taken reference of both operands" ,
113- |db | {
113+ |diag | {
114114 let lsnip = snippet ( cx, l. span , "..." ) . to_string ( ) ;
115115 let rsnip = snippet ( cx, r. span , "..." ) . to_string ( ) ;
116116 multispan_sugg (
117- db ,
117+ diag ,
118118 "use the values directly" . to_string ( ) ,
119119 vec ! [ ( left. span, lsnip) , ( right. span, rsnip) ] ,
120120 ) ;
@@ -124,9 +124,9 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for EqOp {
124124 && !rcpy
125125 && implements_trait ( cx, lty, trait_id, & [ cx. tables . expr_ty ( right) . into ( ) ] )
126126 {
127- span_lint_and_then ( cx, OP_REF , e. span , "needlessly taken reference of left operand" , |db | {
127+ span_lint_and_then ( cx, OP_REF , e. span , "needlessly taken reference of left operand" , |diag | {
128128 let lsnip = snippet ( cx, l. span , "..." ) . to_string ( ) ;
129- db . span_suggestion (
129+ diag . span_suggestion (
130130 left. span ,
131131 "use the left value directly" ,
132132 lsnip,
@@ -142,9 +142,9 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for EqOp {
142142 OP_REF ,
143143 e. span ,
144144 "needlessly taken reference of right operand" ,
145- |db | {
145+ |diag | {
146146 let rsnip = snippet ( cx, r. span , "..." ) . to_string ( ) ;
147- db . span_suggestion (
147+ diag . span_suggestion (
148148 right. span ,
149149 "use the right value directly" ,
150150 rsnip,
@@ -161,9 +161,9 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for EqOp {
161161 if ( requires_ref || lcpy)
162162 && implements_trait ( cx, lty, trait_id, & [ cx. tables . expr_ty ( right) . into ( ) ] )
163163 {
164- span_lint_and_then ( cx, OP_REF , e. span , "needlessly taken reference of left operand" , |db | {
164+ span_lint_and_then ( cx, OP_REF , e. span , "needlessly taken reference of left operand" , |diag | {
165165 let lsnip = snippet ( cx, l. span , "..." ) . to_string ( ) ;
166- db . span_suggestion (
166+ diag . span_suggestion (
167167 left. span ,
168168 "use the left value directly" ,
169169 lsnip,
@@ -179,9 +179,9 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for EqOp {
179179 if ( requires_ref || rcpy)
180180 && implements_trait ( cx, cx. tables . expr_ty ( left) , trait_id, & [ rty. into ( ) ] )
181181 {
182- span_lint_and_then ( cx, OP_REF , e. span , "taken reference of right operand" , |db | {
182+ span_lint_and_then ( cx, OP_REF , e. span , "taken reference of right operand" , |diag | {
183183 let rsnip = snippet ( cx, r. span , "..." ) . to_string ( ) ;
184- db . span_suggestion (
184+ diag . span_suggestion (
185185 right. span ,
186186 "use the right value directly" ,
187187 rsnip,
0 commit comments