@@ -110,11 +110,11 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for EqOp {
110
110
OP_REF ,
111
111
e. span ,
112
112
"needlessly taken reference of both operands" ,
113
- |db | {
113
+ |diag | {
114
114
let lsnip = snippet ( cx, l. span , "..." ) . to_string ( ) ;
115
115
let rsnip = snippet ( cx, r. span , "..." ) . to_string ( ) ;
116
116
multispan_sugg (
117
- db ,
117
+ diag ,
118
118
"use the values directly" . to_string ( ) ,
119
119
vec ! [ ( left. span, lsnip) , ( right. span, rsnip) ] ,
120
120
) ;
@@ -124,9 +124,9 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for EqOp {
124
124
&& !rcpy
125
125
&& implements_trait ( cx, lty, trait_id, & [ cx. tables . expr_ty ( right) . into ( ) ] )
126
126
{
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 | {
128
128
let lsnip = snippet ( cx, l. span , "..." ) . to_string ( ) ;
129
- db . span_suggestion (
129
+ diag . span_suggestion (
130
130
left. span ,
131
131
"use the left value directly" ,
132
132
lsnip,
@@ -142,9 +142,9 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for EqOp {
142
142
OP_REF ,
143
143
e. span ,
144
144
"needlessly taken reference of right operand" ,
145
- |db | {
145
+ |diag | {
146
146
let rsnip = snippet ( cx, r. span , "..." ) . to_string ( ) ;
147
- db . span_suggestion (
147
+ diag . span_suggestion (
148
148
right. span ,
149
149
"use the right value directly" ,
150
150
rsnip,
@@ -161,9 +161,9 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for EqOp {
161
161
if ( requires_ref || lcpy)
162
162
&& implements_trait ( cx, lty, trait_id, & [ cx. tables . expr_ty ( right) . into ( ) ] )
163
163
{
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 | {
165
165
let lsnip = snippet ( cx, l. span , "..." ) . to_string ( ) ;
166
- db . span_suggestion (
166
+ diag . span_suggestion (
167
167
left. span ,
168
168
"use the left value directly" ,
169
169
lsnip,
@@ -179,9 +179,9 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for EqOp {
179
179
if ( requires_ref || rcpy)
180
180
&& implements_trait ( cx, cx. tables . expr_ty ( left) , trait_id, & [ rty. into ( ) ] )
181
181
{
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 | {
183
183
let rsnip = snippet ( cx, r. span , "..." ) . to_string ( ) ;
184
- db . span_suggestion (
184
+ diag . span_suggestion (
185
185
right. span ,
186
186
"use the right value directly" ,
187
187
rsnip,
0 commit comments