Skip to content

Commit d7af836

Browse files
committed
Fix main compatibility
1 parent efddc6a commit d7af836

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

clippy_lints/src/std_instead_of_core.rs

+7-7
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ use rustc_hir::def_id::DefId;
77
use rustc_hir::intravisit::FnKind;
88
use rustc_hir::{
99
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,
1111
};
1212
use rustc_lint::{LateContext, LateLintPass, LintContext};
1313
use rustc_middle::lint::in_external_macro;
@@ -209,8 +209,8 @@ impl StdReexports {
209209
cx,
210210
lint,
211211
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}`"),
214214
replace_with.to_string(),
215215
Applicability::MachineApplicable,
216216
);
@@ -229,7 +229,7 @@ impl StdReexports {
229229
lint,
230230
member.hir_id,
231231
member.inner,
232-
&format!("used import from `{used_mod}` instead of `{replace_with}`"),
232+
format!("used import from `{used_mod}` instead of `{replace_with}`"),
233233
|diag| {
234234
diag.help(format!("consider importing the item from `{replace_with}`"));
235235
},
@@ -301,8 +301,8 @@ impl<'tcx> LateLintPass<'tcx> for StdReexports {
301301
cx,
302302
lint,
303303
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}`"),
306306
replace_with.to_string(),
307307
Applicability::MachineApplicable,
308308
);
@@ -347,7 +347,7 @@ impl<'tcx> LateLintPass<'tcx> for StdReexports {
347347
}
348348

349349
#[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>) {
351351
self.suggest_for_open_use_item_if_after(cx, local.span);
352352
}
353353

0 commit comments

Comments
 (0)