Skip to content

Commit 4c061ef

Browse files
committed
cargo dev dogfood
1 parent a449318 commit 4c061ef

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

clippy_lints/src/use_crate_prefix_for_self_imports.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use clippy_utils::source::snippet_opt;
33
use def_id::LOCAL_CRATE;
44
use rustc_errors::Applicability;
55
use rustc_hir::def::Res;
6-
use rustc_hir::*;
6+
use rustc_hir::{Item, ItemKind, def_id};
77
use rustc_lint::{LateContext, LateLintPass, LintContext};
88
use rustc_session::declare_lint_pass;
99
use rustc_span::{FileName, RealFileName};
@@ -58,10 +58,10 @@ impl LateLintPass<'_> for UseCratePrefixForSelfImports {
5858
span_lint_and_sugg(
5959
cx,
6060
USE_CRATE_PREFIX_FOR_SELF_IMPORTS,
61-
use_path.span,
61+
segment.ident.span,
6262
"this import is not clear",
6363
"prefix with `crate::`",
64-
format!("crate::{}", snippet_opt(cx, use_path.span).unwrap()),
64+
format!("crate::{}", snippet_opt(cx, segment.ident.span).unwrap()),
6565
Applicability::MachineApplicable,
6666
);
6767
}

0 commit comments

Comments
 (0)