@@ -7,7 +7,7 @@ use rustc_hir::def_id::DefId;
7
7
use rustc_hir:: intravisit:: FnKind ;
8
8
use rustc_hir:: {
9
9
Arm , Block , Body , Expr , FieldDef , FnDecl , ForeignItem , GenericParam , Generics , HirId , ImplItem , Item , ItemKind ,
10
- Local , Mod , Pat , Path , PathSegment , PolyTraitRef , Stmt , TraitItem , Ty , UseKind , Variant , VariantData ,
10
+ LetStmt , Mod , Pat , Path , PathSegment , PolyTraitRef , Stmt , TraitItem , Ty , UseKind , Variant , VariantData ,
11
11
} ;
12
12
use rustc_lint:: { LateContext , LateLintPass , LintContext } ;
13
13
use rustc_middle:: lint:: in_external_macro;
@@ -209,8 +209,8 @@ impl StdReexports {
209
209
cx,
210
210
lint,
211
211
first_segment_ident_span,
212
- & format ! ( "used import from `{used_mod}` instead of `{replace_with}`" ) ,
213
- & format ! ( "consider importing the item from `{replace_with}`" ) ,
212
+ format ! ( "used import from `{used_mod}` instead of `{replace_with}`" ) ,
213
+ format ! ( "consider importing the item from `{replace_with}`" ) ,
214
214
replace_with. to_string ( ) ,
215
215
Applicability :: MachineApplicable ,
216
216
) ;
@@ -229,7 +229,7 @@ impl StdReexports {
229
229
lint,
230
230
member. hir_id ,
231
231
member. inner ,
232
- & format ! ( "used import from `{used_mod}` instead of `{replace_with}`" ) ,
232
+ format ! ( "used import from `{used_mod}` instead of `{replace_with}`" ) ,
233
233
|diag| {
234
234
diag. help ( format ! ( "consider importing the item from `{replace_with}`" ) ) ;
235
235
} ,
@@ -301,8 +301,8 @@ impl<'tcx> LateLintPass<'tcx> for StdReexports {
301
301
cx,
302
302
lint,
303
303
first_segment. ident . span ,
304
- & format ! ( "used import from `{used_mod}` instead of `{replace_with}`" ) ,
305
- & format ! ( "consider importing the item from `{replace_with}`" ) ,
304
+ format ! ( "used import from `{used_mod}` instead of `{replace_with}`" ) ,
305
+ format ! ( "consider importing the item from `{replace_with}`" ) ,
306
306
replace_with. to_string ( ) ,
307
307
Applicability :: MachineApplicable ,
308
308
) ;
@@ -347,7 +347,7 @@ impl<'tcx> LateLintPass<'tcx> for StdReexports {
347
347
}
348
348
349
349
#[ inline]
350
- fn check_local ( & mut self , cx : & LateContext < ' tcx > , local : & ' tcx Local < ' tcx > ) {
350
+ fn check_local ( & mut self , cx : & LateContext < ' tcx > , local : & ' tcx LetStmt < ' tcx > ) {
351
351
self . suggest_for_open_use_item_if_after ( cx, local. span ) ;
352
352
}
353
353
0 commit comments