@@ -163,25 +163,25 @@ declare_clippy_lint! {
163
163
/// *Example:**
164
164
/// Bad:
165
165
/// ```rust,ignore
166
- /// span_lint_and_then(cx, TEST_LINT, expr.span, lint_msg, |db | {
167
- /// db .span_suggestion(
166
+ /// span_lint_and_then(cx, TEST_LINT, expr.span, lint_msg, |diag | {
167
+ /// diag .span_suggestion(
168
168
/// expr.span,
169
169
/// help_msg,
170
170
/// sugg.to_string(),
171
171
/// Applicability::MachineApplicable,
172
172
/// );
173
173
/// });
174
- /// span_lint_and_then(cx, TEST_LINT, expr.span, lint_msg, |db | {
175
- /// db .span_help(expr.span, help_msg);
174
+ /// span_lint_and_then(cx, TEST_LINT, expr.span, lint_msg, |diag | {
175
+ /// diag .span_help(expr.span, help_msg);
176
176
/// });
177
- /// span_lint_and_then(cx, TEST_LINT, expr.span, lint_msg, |db | {
178
- /// db .help(help_msg);
177
+ /// span_lint_and_then(cx, TEST_LINT, expr.span, lint_msg, |diag | {
178
+ /// diag .help(help_msg);
179
179
/// });
180
- /// span_lint_and_then(cx, TEST_LINT, expr.span, lint_msg, |db | {
181
- /// db .span_note(expr.span, note_msg);
180
+ /// span_lint_and_then(cx, TEST_LINT, expr.span, lint_msg, |diag | {
181
+ /// diag .span_note(expr.span, note_msg);
182
182
/// });
183
- /// span_lint_and_then(cx, TEST_LINT, expr.span, lint_msg, |db | {
184
- /// db .note(note_msg);
183
+ /// span_lint_and_then(cx, TEST_LINT, expr.span, lint_msg, |diag | {
184
+ /// diag .note(note_msg);
185
185
/// });
186
186
/// ```
187
187
///
@@ -258,9 +258,10 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for LintWithoutLintPass {
258
258
if_chain ! {
259
259
if let ExprKind :: AddrOf ( _, _, ref inner_exp) = expr. kind;
260
260
if let ExprKind :: Struct ( _, ref fields, _) = inner_exp. kind;
261
- let field = fields. iter( )
262
- . find( |f| f. ident. as_str( ) == "desc" )
263
- . expect( "lints must have a description field" ) ;
261
+ let field = fields
262
+ . iter( )
263
+ . find( |f| f. ident. as_str( ) == "desc" )
264
+ . expect( "lints must have a description field" ) ;
264
265
if let ExprKind :: Lit ( Spanned {
265
266
node: LitKind :: Str ( ref sym, _) ,
266
267
..
@@ -396,7 +397,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for CompilerLintFunctions {
396
397
if let Some ( sugg) = self . map. get( & * fn_name. as_str( ) ) ;
397
398
let ty = walk_ptrs_ty( cx. tables. expr_ty( & args[ 0 ] ) ) ;
398
399
if match_type( cx, ty, & paths:: EARLY_CONTEXT )
399
- || match_type( cx, ty, & paths:: LATE_CONTEXT ) ;
400
+ || match_type( cx, ty, & paths:: LATE_CONTEXT ) ;
400
401
then {
401
402
span_lint_and_help(
402
403
cx,
0 commit comments